Fix problems in shared_ptr wrappers where the class names were
not consistent when using the shared_ptr template or the actual
underlying type. Move $R_class substitution to typemaps.
Issue #2386
Add support for special variable replacement in the $typemap()
special variable macro for R specific typemaps (rtype, rtypecheck,
scoercein, scoereout).
This reverts commit ea514c3961.
The new runme.js isn't used for node because it fails to run
multicpptest testcases, but was failing for jsc in CI.
The first problem is the new file is missing `new` where the two
objects are created, but fixing that reveals that this testcase
is currently broken for Javascript so just revert for now.
Look up unknown base classes using SWIG_MangledTypeQueryModule().
Revert to using SWIG_TypeCheck() instead of SWIG_TypeCheckStruct()
as the latter doesn't seem to work for this case (at least for PHP
right now).
Add mod_runme.php as a regression test for this.
Adjust the PHP test harness not to set up reflection for the module
unless it's actually needed for a testcase. Currently the approach
to find the module name doesn't work for multi-module testcases.
See #2126
* fix-cast:
add tests for new casting behavior
skip tests when value is out of range
refactor integers JS testcase to avoid repeating code
Return uint64_t as double if is bigger than uint32_t
Use SWIG_TypeCast in SWIG_V8_ConvertInstancePtr if types don't match (#3)
Arrange that destructors of local C++ objects in the wrapper function
get run on SWIG_fail (which calls Rf_error() which calls longjmp()).
We achieve this by putting almost everything in the function in its
own block, and end that right before Rf_error() at which point those
destructors will get called.
Arrange that destructors of local C++ objects in the wrapper function
get run on SWIG_fail (which calls lua_error() which calls longjmp()).
We achieve this by putting almost everything in the function in its
own block, and end that right before lua_error() at which point those
destructors will get called.
The out typemap uses a function name which doesn't match the name of the
function we want it to apply to, so this testcase wasn't actually
triggering an exception so wasn't actually testing anything!
With that fixed, the testcase fails to compile for PHP due to use of
SWIG_exception_fail() (which not all target languages implement), and
with that fixed, the _runme.php needs a try ... catch adding to handle
the raised exception.
Users of swig 4.0.2 and python 3.10 will likely define the
PY_SSIZE_T_CLEAN macro by hand when relevant because their bindings
won't build otherwise.
Unconditionally defining PY_SSIZE_T_CLEAN in swig 4.10 will lead to
macro redefinition warning.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Add Swig_obligatory_macros which must be called by each
target language to define SWIG_VERSION correctly
in the generated code, as well as the language specific
macro SWIGXXX where XXX is the target language name.
Drop the #ifdef SWIGXXX that was previously generated -
I can't see the point of this and if users are defining
this macro somehow, then users will need to change this
Closes#1050