mmomtchev / swig

This is SWIG JavaScript Evolution, a fork of the SWIG project with modern JavaScript/TypeScript support including WASM and async
http://www.swig.org
Other
7 stars 0 forks source link

Provide some kind of built-in method for a typemap to detect if it is being used in async mode #35

Open mmomtchev opened 4 months ago

mmomtchev commented 4 months ago

Allow a typemap to include different code when used in async mode

Something along the lines of:

%typemap(in) type %{
#ifdef ASYNC
  $1 = 0;
#else
  $1 = 1;
#endif
%}