ccache.c:738:18: runtime error: null pointer passed as argument 1, which is declared to never be null
Fixes stderr redirect in testname CCACHE_CPP2, when the CCACHE_CPP2
environment variable is defined.
mdfour.c:91:20: runtime error: left shift of 139 by 24 places cannot be represented in type 'int'
Looks like this brings some stability to the md4 hash calculation.
Closes#2449
decltype now accepts C++ expressions instead of just an ID, such as:
int i,j;
... decltype(i+j) ...
... decltype(&i) ...
These result in a warning for non-trivial expressions which SWIG cannot evaluate:
Warning 344: Unable to deduce decltype for 'i+j'.
See 'Type Inference' in CPlusPlus.html for workarounds.
Issue #1589
Issue #1590
* rtests2:
more r tests
more r tests
added testcase pointer_reference
[PHP] Update docs for removal of -noproxy in SWIG 4.1.0
Conflicts:
CHANGES.current
Recent commits ensure types are correctly stored in SwigType *. In
particular template parameters are enclosed within '<(' and ')>'.
Now we can confidently handle template parameters as really being
delimited as such to fix an infinite loop handling template expressions
containing '<' or '>'. The previous implementation only assumed
template parameters were delimited by '<' and '>'.
Issue #1037
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.
Fixes infinite loop due to () brackets in a non-type template
parameter containing an expression
Fixes#2418
Non-trivial expressions are still not qualified properly though.
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)
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).
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.
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
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
The only documentation is in the file itself and describes a Python
wrapper around the C function defined here, but digging though the git
history this Python wrapper doesn't seem to have ever actually been
generated by SWIG.
This file was also marked as deprecated in 2005.
Fixes#2390Fixes#2391
* python_subinterpreter_issues:
added comment in CHANGES.current
always get the type_pointer from capsule instead of using a static variable as the value may change after re-initilization/due to subinterpreters
added interpreter_counter to deinitialize only once in case of subinterpreters
Conflicts:
CHANGES.current
Lib/python/pyrun.swg
Such as:
class X final {};
This no longer gives a syntax error.
This change has introduced one more shift-reduce conflict in the parser.
with a conflict with a C style variable declaration with name final:
class X final;
resulting in a syntax error (for C++ not C). This is an an unusual style
for C++ code and more typical declarations do work:
X final;
Closes#672
Until now SWIG quietly ignored such errors unless -Wextra (or -Wall
which implies -Wextra) was passed, but this is unhelpful as it hides
problems. To illustrate this point, enabling this warning by
default revealled a typo in the preproc_defined.i testcase in
SWIG's own testsuite.
If you really don't want to see this warning, you can suppress it
with command line option -w202 or by using this in your interface
file:
%warnfilter(SWIGWARN_PP_EVALUATION);
Both will work with older versions of SWIG too.
Fixes#1465Fixes#2389
Ensure that SWIG_VERSION is defined both at SWIG-time and in the
generated C/C++ wrapper code (it was only defined in the wrapper
for some target languages previously).
SWIGGO and SWIGJAVASCRIPT are now defined in the generated wrappers
to match behaviour for all other target languages.
Stop defining SWIGVERSION in the wrapper. This only happened as a
side-effect of how SWIG_VERSION was defined but was never documented and
is redundant.
The new testcase also checks that SWIG is defined at SWIG-time but not
in the generated wrapper, and that exactly one of a list of
target-language specific macros is defined.
Fixes#1050
The one we're currently using only considers the last five characters
plus the least significant bit of the last-but-sixth character, which
unsurprisingly generates a lot of many-way collisions.
This change seems to give about a 4% reduction in wallclock time for
processing li_std_list_wrap.i from the testsuite for Python. The
hash collision rate for this example drops from 39% to 0!
Closes#2303
Output C/C++ type strings (| separated) in swig_type_info tables in
fixed order. The types are output in alphabetically sorted order,
with an exception. The final type is a fully resolved type, but
does not necessarily include default template parameters.
This type is the one used by SWIG_TypePrettyName which is commonly
used to display a type when the wrong type is passed in as a
parameter.
Previously the order was not very deterministic due to the use of
internal hash tables which do not have an ordering guarantee.
Includes the majority of patch #1484.
Excludes changes in typepass.cxx for specializations which have no effect
on the duplicate_class_name_in_ns testcase, nor the rest of the test-suite.
Go, Guile, Racket, Scilab: Add throws typemaps for std::string so that
thrown string exception messages can be seen.
Test all language for std::string throws typemaps
and exception specifications for native types.
Now the raised exception contains the string value as the exception
message instead of just the C/C++ type of the exception.
R exceptions were completely swallowed beforehand