Tests for std::vector of pointers added which check
std::vector<T*>::const_reference and std::vector<T*>::reference
usage which gave compilation errors in Python and Perl which had
specialized these vectors incorrectly.
* 'master' of git+ssh://github.com/swig/swig:
[Python] Fix some errors in the documentation for -threads
Fixed typo in Perl5 docs.
Update PHP testsuite for vadz's new cars
[php] Whitespace improvements in generated C/C++ code
Fix hardcoded _v in PHP typecheck typemaps
Fix access to already released memory during PHP module shutdown, which
often didn't cause visible problems, but could result in segmentation
faults, bus errors, etc. Fixes#1170, reported by Jitka Plesníková.
PHP5 is no longer actively supported by the PHP developers and security
support for it ends completely at the end of 2018, so it doesn't make
sense to include support for it in the upcoming SWIG 4.0.0 release.
See #701.
The affected typemap is %typemap(in) SWIGTYPE *DISOWN, where the
error message was referring to $&1_descriptor but the descriptor
actually used by the typemap is $1_descriptor.
Register internal 'swig_runtime_data_type_pointer' constant as
"CONST_PERSISTENT" to avoid segmentation fault on module unload. Fixes
https://github.com/swig/swig/issues/859 reported by Timotheus Pokorra -
thanks also to Javier Torres for a minimal reproducer.
Leave PHP5 wrapping them as integers as this change could cause
incompatibilities.
Fixes issue https://github.com/swig/swig/issues/686 noted by Nishant
Gupta.
PHP5's C extension API has changed substantially so you need to use
-php7 to specify you want PHP7 compatible wrappers.
Fixes https://github.com/swig/swig/issues/571
The existing typemap was just broken - it correctly created the resource
and then did nothing with it, and instead tried to register the member
pointer as a normal pointer, which is never going to work as it's larger
than a normal pointer.
Add cpp_basic_runme.php as a regression test for this.
Use ZEND_FE_END (introduced sometime around 5.2) to obtain the correct
number of arguments for zend_function_entry. Fallback to the original
3 argument initializer if not defined, however, this will not fix the
initializer warning though for some older versions of PHP.
director method - PHP NULL gets returned by the subclassed method
in this case, so the directorout typemap needs to allow that (at
least if an exception is active).
and newer (and some missing ones from 5.3). Reserved PHP constants
names are now checked against enum values and constants, instead
of against function and method names. Built-in PHP function names
no longer match methods added by %extend. Functions and methods
named '__sleep', '__wakeup', 'not', 'parent', or 'virtual' are no
longer needlessly renamed.
clang++ using -stdlib=libc++ defines const_reference as a class,
to map boolean vectors onto a bit set. Because swig does
not "see" the type as "const &" it generates incorrect code for this case,
generating a declaration like:
const_reference result;
When const_reference is a typedef to 'bool' as is the case with stdlibc++
this works. When this is actually a constant reference, this is clearly
invalid since it is not initialized. For libc++, this is a class
which cannot be default constructed, resulting in an error. The fix
is to explicitly define the various accessor extensions as having a
bool return type for this specialization.