$needNewFlow in an output typemap is now only relevant when wrapping
to a PHP __construct method, and there the return type is known so
factory.i isn't useful.
PHP doesn't accept literal NULL for a parameter passed by reference;
passing a variable with a value of NULL is just like passing a
variable with a different value - we get a PHP reference to the
variable, not NULL.
The code in testcase memberin_extend_c would end up without a
terminating nul if passed a 50 byte string, and then make_upper()
would run off the end of the buffer.
Fix by using strncat() (which always nul terminates the result, and
also doesn't zero-fill the tail of the buffer if the result is
shorter).
This avoids using _v uninitialised if there's an empty typecheck
typemap, such as the dummy one we have for std::initializer_list.
Fixes GCC warning on cpp11_initializer_list testcase when compiled
with -O2.
Previously we checked for a <varname>_get() method instead, but that
will misfire for an method actually called foo_get() in the C++ API
being wrapped.
Previously we called set_error_handler() in tests.php to do this, but
that only sets it for the test-suite. Now we set it in on the PHP
command line, which works for both.
Specifying CPP11=1 also passes -std=c++11 to the compiler, which is
really unhelpful here as that disables all GNU extensions which breaks
the PHP C API headers.
Make it work with how globals are actually wrapped. It looks like
this example has never been right, but nobody noticed before PHP 8
started warning about the use of unset variables.
This reveals that handling of std::string properties needs fixing.
Building once with a different compiler on a different platform is
useful, but running multiple builds for languages I'm not working
on is a waste of donated CPU time, and having CI reported as failing
because the Python builds on cygwin aren't currently working is
downright unhelpful.
This isn't really workable since PHP doesn't support intercepting
accesses to global variables (nor to static class properties, so
we can't wrap C/C++ global variables that way either).
The _get() and _set() function wrappers actually work and have
been generated for a very long time.