MSHUTDOWN, RINIT, RSHUTDOWN and MINFO are often empty, so check and
omit them if this is the case, and set the module structure entry to
NULL instead. Reduces code size, number of external functions on the
module, and runtime overhead a little (RINIT and RSHUTDOWN are called
on every request when used with a webserver).
PHP 7.1 no longer supports calling methods with fewer parameters
than declared, so we need to generate __construct() with default
values for all but the first parameter.
Previously we emitted a separate one for every wrapped function,
but typically many functions have the same number of parameters
and combinations of parameters passed by reference or not.
This change significantly reduces both the size of the generated
wrapper, and of the compiled PHP extension module (e.g. by ~6% for
the stripped extension module for Xapian's PHP7 bindings).
This is SWIG's default for every language except PHP, and now is a
good time to make this change so that once we drop PHP5 support, we'll
have the same default everywhere. It's easy to override the default
with -cppext cxx to get the PHP5 behaviour.
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
Previously the return value of call_user_function() was ignored and we
checked an uninitialised value instead. Fixes#627. Based on patch
from Sergey Seroshtan.
* char-escaping:
Add missing string_constant.i testcase
changes file update for char wrappers
C# char wrappers fixes for enum values, static const member char values and %csconst
D testing added for %dmanifestconst and char constants
Fix wrapping D constants using %dmanifestconst
Php fix for enum value of '\0'
Fix static const char member variables wrappers with %javaconst(1).
Expand char testing in enums and %constant
Java char changes file update
Java enum and static member variable escaping fix for chars
Add tests for enum values and static const member variables chars containing escape sequences
Minor documentation tweak
Conflicts:
CHANGES.current
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.
Provide -cppext as a general command line option for setting the
extension used for generated C++ files (previously it was specific
to the PHP backend). Deprecate the equivalent -suffix option
provided by the Ocaml backend, but continue to support that for
now.
changed to be consistent with other languages. The typemaps
provided by SWIG have been updated accordingly, but if you
have written your own directorout typemaps, you'll need to
update $input to &$input (or make equivalent changes).
*** POTENTIAL INCOMPATIBILITY ***