Commit graph

23,189 commits

Author SHA1 Message Date
AndLLA
b15e058a27 typo in comment 2022-10-24 18:20:10 +01:00
AndLLA
a71bb2bc6e fix naming of RClass when template of a shared_ptr 2022-10-24 18:20:10 +01:00
William S Fulton
38c2c15e61 Merge branch 'MSB8027'
* MSB8027:
  CMake: Avoid including parser.c twice
  Fix -Wunused-variable warning
2022-10-24 16:28:29 +01:00
William S Fulton
6370fab025 R - fix $typemap() for R specific typemaps
Add support for special variable replacement in the $typemap()
special variable macro for R specific typemaps (rtype, rtypecheck,
scoercein, scoereout).
2022-10-24 16:27:54 +01:00
William S Fulton
1d73341aa4 Polymorphism in R wrappers fixed for C++ structs 2022-10-24 08:56:55 +01:00
Julien Schueller
2f3fb6a52f CMake: Avoid including parser.c twice
Closes #2409
2022-10-24 09:34:13 +02:00
Julien Schueller
0d523d337d Fix -Wunused-variable warning 2022-10-24 09:34:10 +02:00
Olly Betts
cfd2557cda Revert "[js] Add mod_runme.js"
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.
2022-10-20 11:42:27 +13:00
Olly Betts
f40658c2d0 [python] Avoid undefined behaviour
Cast a parameter type explicitly rather than implicitly by casting
the function pointer type, as the latter is undefined behaviour.

Caught by ubsan.
2022-10-20 10:37:47 +13:00
Olly Betts
a5bc48afea [Lua] Fix type resolution between SWIG-wrapped modules
See #2126
2022-10-20 10:14:59 +13:00
Olly Betts
867e49d7c5 [Ocaml] Add mod_runme.ml
See #2126
2022-10-19 07:42:11 +13:00
Olly Betts
ea514c3961 [js] Add mod_runme.js
See #2126
2022-10-19 07:35:53 +13:00
Olly Betts
76b700d2e0 CHANGES: Add blank line before 4.0.0 2022-10-19 07:35:31 +13:00
William S Fulton
01627edaff Remove C++11 from li_std_vector_vector testcase 2022-10-18 08:05:49 +01:00
Olly Betts
747a6a264f [php] Fix handling of multi-module cases
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
2022-10-18 10:28:17 +13:00
William S Fulton
d8a0286012 R - Add support for std::vector<std::vector<std::string>>
Closes #2385
2022-10-17 20:14:45 +01:00
William S Fulton
d58eb86821 Testcase warning fix
Workaround for seemingly bogus warning: ‘<unnamed>[0]’ may be used uninitialized [-Wmaybe-uninitialized]
2022-10-15 14:58:26 +01:00
William S Fulton
e622a708d2 Fix Javascript node test-suite to use desired c++ standard
Passes the -std determined in configure.ac to node-gyp
2022-10-15 14:58:25 +01:00
William S Fulton
4c86f45c54 Fix for Java 7 - std::set and std::unordered_set 2022-10-15 14:57:30 +01:00
William S Fulton
1c70dbdb6c Bump doc version to SWIG-4.1 2022-10-15 00:28:09 +01:00
William S Fulton
7be1217d3e Allow wkhtmltopdf to access current directory
Fix for version 0.12.6, see https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4536
2022-10-15 00:28:04 +01:00
William S Fulton
0e60d6b7a4 Correct new Raise functions to be static 2022-10-14 22:51:26 +01:00
William S Fulton
fd2420cdcc Remove STRING_VALUE to keep supporting older versions of R
STRING_VALUE does not work with R_NO_REMAP
in older versions (it broke 3.0.2)
2022-10-14 22:49:07 +01:00
William S Fulton
15c433c5f9 C89 fixes 2022-10-14 22:34:18 +01:00
William S Fulton
1b5c4546ba Add v8 numeric change to changes file 2022-10-14 19:25:13 +01:00
William S Fulton
bba072d95d Merge branch 'fix-cast'
* 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)
2022-10-14 19:19:13 +01:00
William S Fulton
54497fce49 html fixes 2022-10-14 08:45:38 +01:00
William S Fulton
7334e9c16f
Merge pull request #2401 from hramrach/master
Define PY_SSIZE_T_CLEAN only when not defined yet
2022-10-14 07:56:09 +01:00
Olly Betts
5f96d15943 [R] Run destructors of local C++ objects on SWIG_fail
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.
2022-10-14 14:44:19 +13:00
Olly Betts
fefb231bd8 [php] Update exception_memory_leak_runme.php
Test the new "return by value" case too.
2022-10-14 14:44:19 +13:00
Olly Betts
9ab9c71623 [lua] Run destructors of local C++ objects on SWIG_fail
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.
2022-10-14 14:44:19 +13:00
Olly Betts
3dd7e93c77 Fix issues with exception_memory_leak testcase
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.
2022-10-14 12:12:21 +13:00
Michal Suchanek
c3f17b415d Define PY_SSIZE_T_CLEAN only when not defined yet
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>
2022-10-13 23:26:58 +02:00
William S Fulton
752b7e82cd Add missing SWIGTYPE *const& typemaps 2022-10-13 22:22:18 +01:00
William S Fulton
f13de56e5f Revert "[xml] Move to "Experimental" target language status"
This reverts commit 22a4355f34.

Conflicts:
	CHANGES.current
	RELEASENOTES
2022-10-13 21:14:44 +01:00
William S Fulton
46f7501d94 Cleanup SWIG_VERSION definition
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
2022-10-13 19:47:43 +01:00
Olly Betts
e123c2afe8 Additional SWIG_VERSION testing 2022-10-13 08:09:13 +01:00
William S Fulton
c82aa3bb41 Quick fix SWIG_VERSION not being defined correctly in wrappers 2022-10-13 07:57:09 +01:00
Sergio Garcia Murillo
cdb0e498a1
Merge pull request #2 from mildsunrise/fix-cast
expand testcase to test for new casting behavior
2022-10-11 14:09:07 +02:00
William S Fulton
6b6761abac Update 4.1.0 release notes summary 2022-10-10 23:58:39 +01:00
William S Fulton
d5a0201c54 XML whitespace changes
Remove non-conventional whitespace before closing tag with '>'.
2022-10-10 23:58:39 +01:00
Olly Betts
5be76e6dcc Makefile.in: Remove unused variables dd and srpm
srpm is no longer used since the recent removal of the srcrpm
target in 623b7d97a7.

dd hasn't been used since 4ce80105c8
back in 2006!
2022-10-11 10:30:37 +13:00
Olly Betts
ac00c7ad98 Fix php example comment typo 2022-10-11 10:30:37 +13:00
Olly Betts
abf5c8a357 [python] Remove doc caveat for Python < 2.1
The minimum version we now support is Python 2.7.
2022-10-11 10:30:37 +13:00
Olly Betts
87a677b8b3 Fix doc typos 2022-10-11 10:30:33 +13:00
William S Fulton
2268d6ee96 Fix compile error when using directors
Fix when using templates with more than one template parameter
and used as an input parameter in a virtual method in a
director class (problem affecting most of the scripting languages).

Fixes #2160
2022-10-10 19:51:08 +01:00
William S Fulton
0239ba5536 OCaml director return fix
Fixes director_unwrap_result testcase when returning Element *const *&
2022-10-10 18:55:37 +01:00
Alba Mendez
55d7a51343 add tests for new casting behavior
more integers are preserved now
2022-10-10 13:28:44 +02:00
Alba Mendez
5b02dc93d6 skip tests when value is out of range 2022-10-10 13:28:44 +02:00
Alba Mendez
cf7733e4b8 refactor integers JS testcase to avoid repeating code 2022-10-10 12:49:57 +02:00