| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Support std::array in Golang
Closes #2045
|
|
|
|
|
|
|
| |
We have the swig_type_info available and SWIG_TypeCheckStruct
is more efficient because it uses a pointer comparison instead of the
string comparison SWIG_TypeCheck uses (this change speeds up `make
check-php-test-suite` by about 10%).
|
|
|
|
|
|
| |
Add PHP keyword 'readonly' (added in 8.1) to the list SWIG knows to
automatically rename. This keyword is special in that PHP allows it to
be used as a function (or method) name.
|
|
|
|
|
|
|
| |
Previously the zend_class_entry for Foo was named SWIGTYPE_Foo_ce, but
this can collide in some cases - e.g. if there's a class named p_Foo
then its zend_class entry will be SWIGTYPE_p_Foo_ce, but that's the same
as the swig_type_info for a class named p_Foo_ce.
|
|
|
|
|
|
|
|
|
|
| |
Do more initialisation at module load time.
Use a shared set of handlers for cases when the C/C++ object is
destroyed with free().
Most of the code in the free_obj and create_object handlers is the
same for every wrapped class so factor that out into common functions.
|
|
|
|
|
| |
We shouldn't be using symbols starting `php` as that risks collisions
with future symbols defined by PHP.
|
| |
|
| |
|
|
|
|
|
|
| |
This typemap which would wrap C++ bool as PHP int is later overridden
by another which wraps it as PHP bool. The current result is what
we want so just remove the redundant one.
|
|
|
|
|
|
|
|
| |
The correct macro to test is PHP_MAJOR_VERSION so these two PHP 8 cases
weren't ever used, which hid that the PHP8 version of the code was
broken in one of them.
Highlighted in #2113.
|
|\
| |
| | |
Add Python 3.11 support: use Py_SET_TYPE()
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On Python 3.9 and newer, SwigPyBuiltin_SetMetaType() now calls
Py_SET_TYPE(). Py_TYPE() can no longer be usd as an l-value on
Python 3.11:
* https://docs.python.org/dev/c-api/structures.html#c.Py_SET_TYPE
* https://docs.python.org/dev/whatsnew/3.11.html#c-api-changes
|
| |
| |
| |
| | |
is_object to isobject
|
| |
| |
| |
| | |
replacement for check of error_state * Add execute method in addition to call * Replace oct_mach_info with octave::mach_info * Call from interpreter: global_varval global_assign * Assign a global name requires locating the stack which requires interpreter to tree evaluator to callStack * Do not use discard_error_messages or discard_warning_messages
|
|/ |
|
|\
| |
| |
| |
| |
| | |
* fix-crash-2101:
Added extern "C" block that was removed in previous commit.
Fixed crashes when using embedded Python interpreters.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes #2101. There are 3 related changes made here:
1. Move the SWIG_globals() singleton into pyrun from pyint so it
is visible to SWIG_Python_DestroyModule(). The static globals
varlink has been extracted out of the function so that it can
be set to NULL in SWIG_Python_DestroyModule(), which fixes the
issue described in #2101. (Now when the second interpreter
starts up, the Swig_Globals_global pointer will be NULL, so it
knows it has to create a new one.)
2. Remove a Py_DECREF on the globals varlink. The decrement is now
performed by DestroyModule(), so there's no need to do it in
SWIG_init().
3. Fixed similar issue with SWIG_Python_TypeCache().
|
| |
| |
| |
| |
| | |
We require at least node v6 which means v8 5.0, so code to handle
older v8 is no longer useful.
|
|\ \
| | |
| | |
| | |
| | | |
* fix_SWIG_V8_VERSION:
[javascript][v8] SWIG_V8_VERSION generation method corrected.
|
| | |
| | |
| | |
| | |
| | |
| | | |
"SWIG_V8_VERSION" generation method was incorrectly fixed.
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
|
| |/
|/| |
|
| | |
|
| |
| |
| |
| |
| | |
Fixes complex typedefs to const int& and const unsigned int&.
Fixes cpp11_type_aliasing testcase
|
| |
| |
| |
| |
| |
| |
| |
| | |
Javascript - v8 and node only.
When wrapping C code char arrays.
Now calloc is now used instead of new char[] in SWIG_AsCharPtrAndSize.
Fixes gcc-11 warning -Wmismatched-new-delete in arrays and
memberin_extend testcases.
|
| |
| |
| |
| | |
Closes https://github.com/swig/swig/pull/2074
|
| |
| |
| |
| | |
Instead rely only on documented and exported interfaces.
|
| |
| |
| |
| |
| | |
It only worked for Go versions before 1.5, which is more than five
years ago and long-unsupported.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`SWIG_ErrorCode()`, `SWIG_ErrorMsg()`, `SWIG_FAIL()` and `goto thrown;`
are no longer supported (these are really all internal implementation
details and none are documented aside from brief mentions in CHANGES
for the first three). I wasn't able to find any uses at least in FOSS
code via code search tools.
If you are using these:
Use `SWIG_PHP_Error(code,msg);` instead of `SWIG_ErrorCode(code);
SWIG_ErrorMsg(msg);` (which will throw a PHP exception in SWIG >= 4.1
and do the same as the individual calls in older SWIG).
`SWIG_FAIL();` and `goto thrown;` can typically be replaced with
`SWIG_fail;`. This will probably also work with older SWIG, but
please test with your wrappers if this is important to you.
Fixes #2014
|
| |
| |
| |
| |
| |
| |
| |
| | |
Parameter type errors and some other cases in SWIG-generated wrappers
now throw a PHP exception, which is how PHP's native parameter handling
deals with similar situations.
See #2014, but not closing yet as there may be more cases to convert.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This now determines the class of the exception object where a
suitable pre-defined PHP exception class exists - for example,
SWIG_TypeError -> PHP exception class TypeError.
Exception codes which don't naturally map to a pre-defined PHP
exception class are thrown as PHP class Exception (like all
PHP exceptions raised by SWIG_exception were before this change.)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Most pre-defined interfaces are accessible via zend_class_entry*
variables declared in the PHP C API - we can use these to add
an interface at MINIT time (rather than having to wait until RINIT to
look up by name) by having a mapping from PHP interface name to them.
This will also be a little faster than looking up by name.
Closes #2013
|
| | |
|
| | |
|
| |
| |
| |
| | |
internally, so there is no need to call it again here, just correctly handle the NULL return value
|
|\ \
| | |
| | |
| | |
| | | |
# Conflicts:
# CHANGES.current
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.
See #2009.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.
See #2009.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.
See #2009.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.
See #2009.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.
See #2009.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We dropped support for it in SWIG 4.0.0 and nobody has stepped forward
to revive it in over 2 years.
See #2009.
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
PHPCN(x) does a string compare of x with the lower-cased class name,
so x needs to be in lowercase or else the entry has no effect. The
entries for TRUE, FALSE and NULL weren't working as a result.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add some missing entries, remove some long obsolete entries (from
the "ming" extension for generating SWF files, which was split
out from PHP core in 2008), and entry for "static" as a reserved class
name (`static::` is used for late static bindings, but attempting to
name a PHP class `static` fails because `static` is a keyword and we
also list it as such).
|
| |
| |
| |
| |
| | |
SWIG_SetPointerZval() now checks if the passed zval is an object,
so use ZVAL_UNDEF() before in cases where we create a zval to pass.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Eliminate redundant and unused includes.
Only include the minimum headers needed before the PHP_MAJOR_VERSION
check in case future PHP versions remove some of the headers we
include.
|
| |
| |
| |
| | |
We always include zend_exceptions.h via phprun.swg.
|
| |
| |
| |
| |
| | |
We can't safely lookup the Exception class entry at MINIT time, but we
can just use zend_ce_exception instead, which will be a bit faster too.
|
| |
| |
| |
| |
| |
| |
| |
| | |
With modern PHP it only works with the CLI version of PHP, so it's
better to direct users to load the extension via "extension=" in
php.ini.
Suggested by ferdynator in #1529.
|