| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we had a hard-coded list of allowed combinations in the
grammar, but this suffers from combinatorial explosion, and results
in a vague `Syntax error in input` error for invalid combinations.
This means we now support a number of cases which are valid C++
but weren't supported.
Fixes #302
Fixes #2079 (friend constexpr)
Fixes #2474 (virtual explicit)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We now wrap this as a non-static method in PHP, which means the static
form only callable via an object.
Previously this case could end up wrapped as static or non-static
in PHP. If it was wrapped as static, attempting to call non-static
overloaded forms would crash with a segmentation fault.
See #2544
|
| |
|
|
|
|
| |
See #2538
|
| |
|
|
|
|
| |
I don't have access to jsc atm
|
| |
|
|
|
|
|
|
|
|
|
| |
Nodejs is like V8 and needs C++ output enabled when wrapping C code.
The testsuite was masking this bug by using SWIG options
`-v8 -DBUILDING_NODE_EXTENSION=1` rather than `-node` when testing
with nodejs, while the javascript examples currently all seem to all get
processed with -c++.
|
| |
|
|
|
|
|
| |
The bulk of this was already removed in
e3b112c69ceed5c39cb07fa45a3ba62b27712679.
|
| |
|
|
|
|
|
| |
PHP7 security support ended 2022-11-28 so it doesn't make sense to
include support for it in the SWIG 4.2.x release series.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a method with duplicate parameter names is wrapped such as:
void fn_3parms(int p_a, int p_a, double p_c);
Previously all duplicate parameter names were changed in order to
provide unique parameter names:
void fn_3parms(int arg0, int arg1, double p_c)
Now the parameter names changed are just the 2nd and subsequent duplicate
parameter names:
void fn_3parms(int p_a, int arg1, double p_c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Number the variadic parm names instead of not naming them.
Such as:
template<typename... T> int variadicmix1(T... t) { return 20; }
%template(variadicmix1) variadicmix1<A,B,C>;
Used to expand to:
int variadicmix1(A T, B arg1, C arg2)
now:
int variadicmix1(A t1, B t2, C t3)
Also test for generating duplicate parameter names which required
a fix in R. Also results in a few minor changes to parameter names
in generated R code.
|
| |
|
|
|
|
| |
Fixes testcase template_expr which was resulting in OCaml syntax errors.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Further corrections to pass SwigType * to methods expecting types
instead of passing readable type strings.
Swig_string_mangle() takes a generic String *, but it was calling
functions that require SwigType *. Swig_string_mangle_type() is
now provided for SwigType *.
The previous commit is a pre-requisite in order to prevent duplicate
symbols from being generated in the C++ wrappers.
|
|
|
|
|
|
|
|
|
|
|
| |
Named duplicate class template instantiations now issue a warning and are ignored.
Duplicate empty class template instantiations are quietly ignored.
The test cases are fixed for this new behaviour.
This commit is a pre-requisite for the near future so that the Python
builtin wrappers can correctly use the SwigType_namestr function without
generating duplicate symbol names.
|
|
|
|
|
| |
for overloaded methods. Fixes regression (crash) in director_ignore D
testcase since string mangling names change.
|
|
|
|
|
|
| |
Swig_string_mangle => Swig_name_mangle_string
Swig_name_mangle => Swig_name_mangle_string
Swig_string_mangle_type => Swig_name_mangle_type
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Further corrections to pass SwigType * to methods expecting types
instead of passing readable type strings.
Swig_string_mangle() takes a generic String *, but it was calling
functions that require SwigType *. Swig_string_mangle_type() is
now provided for SwigType *r. The special template handling
on types now occurs in this function.
|
|
|
|
|
|
|
|
|
| |
Further corrections to pass SwigType * to methods expecting types
instead of passing readable type strings.
Required reworking code that adds a fake inheritance for smart pointers
using the smartptr feature. Swig_smartptr_upcast() added as a support
function for this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Further switch to use rtypecheck typemaps instead of hard coded logic.
The full switch to typemaps is deferred until swig-4.2 as it can't be fully
backwards compatible. For now a warning is provided to help the
transition. It provides the full typemap that should be placed into
a user's interface file, for example:
%typemap("rtype") int32_t * "integer"
void testmethod(int32_t * i);
void testmethod();
If there is no rtypecheck typemap for int32_t *, the warning shown is:
example.i:7: Warning 750: Optional rtypecheck code is deprecated. Add the
following typemap to fix as the next version of SWIG will not work without it:
%typemap("rtypecheck") int32_t * %{ (is.integer($arg) || is.numeric($arg)) %}
The warning is shown for any code that previously used "numeric", "integer" or
"character" for the rtype typemap. Copying the rtypecheck typemap as
shown into the user interface file will provide the appropriate fix and
the warning will disappear. This is important to do as swig-4.2 will
not be able to provide this helpful warning.
|
|
|
|
|
|
|
|
| |
- Fix for special variable $argtype expansion in rtypecheck typemap.
- Remove unnecessary () brackets when using rtypecheck typemap for
single parameter functions.
- Add rtypecheck typemaps for shared_ptr so that NULL can be used
in overloaded functions taking shared_ptr.
|
|
|
|
|
|
|
|
|
|
|
| |
when incorrect types passed are passed to the overloaded methods.
Old unhelpful error message:
Error in f(...) : could not find function "f"
Example of new improved error message:
Error in use_count(k) :
cannot find overloaded function for use_count with argtypes (NULL)
|
|
|
|
|
|
| |
This was already in the manual, but not in -help output.
Fixes #2420
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* rfix-cleaned-up:
Whitespace cleanup in R testcase
R shared_ptr fixes
align implementation of smartname to r class name
enable test for pointerreftest fixed by 752b7e8
switched implementation reference from java to python
fixes from code review
enable li_boost_shared_ptr in r-test-suite
typo in comment
fix naming of RClass when template of a shared_ptr
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| |
| |
| |
| | |
* MSB8027:
CMake: Avoid including parser.c twice
Fix -Wunused-variable warning
|
| | |
|
| |
| |
| |
| |
| |
| | |
Add support for special variable replacement in the $typemap()
special variable macro for R specific typemaps (rtype, rtypecheck,
scoercein, scoereout).
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
This reverts commit 22a4355f340e9a844d5e5d8d0528d767c4808ebb.
Conflicts:
CHANGES.current
RELEASENOTES
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Remove non-conventional whitespace before closing tag with '>'.
|
|
|
|
| |
Fixes director_unwrap_result testcase when returning Element *const *&
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resolve the return type to correctly determine if the type is a pointer or
reference to a director class.
SwigType_refptr_count_return() recently added as a simpler fix is no
longer needed.
The conventional approach of using the "type" rather than "decl" to
analyse the return type is used instead too.
Issue #1823
|
|\
| |
| |
| |
| | |
* director-unwrap-result:
Unwrap director classes only when returning a pointer or reference to an object
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This involves properly counting the number of references and pointers in the return
type of a function and only generate unwrapping code if this number is 1.
For template instances some post-processing code is added to fix the 'decl' and
'type' attributes of functions if changed in an unfavorable way during template
expansion.
This commit fixes swig#1811.
|