summaryrefslogtreecommitdiff
path: root/Lib/php
Commit message (Collapse)AuthorAgeFilesLines
* Add initial support for PHP8Olly Betts2021-03-191-2/+6
| | | | | Testcase director_overload2 is failing, but the rest of the testsuite passes.
* Improve PHP object creationOlly Betts2021-03-191-9/+5
| | | | | | | | Reportedly the code we were using in the directorin case gave segfaults in PHP 7.2 and later - we've been unable to reproduce these, but the new approach is also simpler and should be bit faster too. Fixes #1527, #1975
* php: Fix char* typecheck typemap to accept NullOlly Betts2021-03-191-1/+4
| | | | | | The corresponding in typemap already does. Fixes #1655, reported by CJSlominski.
* Consistent parameter names for std::pairWilliam S Fulton2019-02-141-2/+2
|
* Add STL container copy constructors where missingWilliam S Fulton2019-02-142-1/+5
| | | | Also provide consistent copy constructor declarations.
* Add missing typedefs to std::vector + typedef correctionsWilliam S Fulton2019-02-131-0/+10
| | | | | | | 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.
* Add missing typedefs to std::pairWilliam S Fulton2019-02-131-0/+2
|
* Add missing typedefs to std::mapWilliam S Fulton2019-02-131-0/+6
|
* Add missing parameter names in STL container wrappersWilliam S Fulton2019-02-131-1/+1
| | | | | | | Mostly in STL copy constructors. Best to have parameter names as they make their way into the wrappers in some target languages.
* Merge branch 'master' of git+ssh://github.com/swig/swigWilliam S Fulton2019-02-123-20/+19
|\ | | | | | | | | | | | | | | | | * '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
| * [php] Whitespace improvements in generated C/C++ codeOlly Betts2019-02-122-15/+14
| |
| * Fix hardcoded _v in PHP typecheck typemapsOlly Betts2019-02-121-5/+5
| | | | | | | | | | This should be $1, which ends up substituted with _v so this does not actually affect behaviour.
* | Create a consistent stl.i library fileWilliam S Fulton2019-02-121-2/+0
|/ | | | | Same file now for all languages except R which is still missing std_map.i. Recent Java changes adding in std_set.i removed.
* Remove PHP-specific avoidance of uninitialised variableOlly Betts2019-02-111-6/+0
| | | | | | This code is no longer needed since ebd37155a81fd0c9504522e43cbdaf38312a132c addressed this more generically.
* [php] Fix typemap indentation (cosmetic)Olly Betts2019-02-111-2/+2
|
* [PHP] Fix access to already released memoryOlly Betts2019-02-092-5/+5
| | | | | | 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á.
* [php] Fix SWIG_ZEND_CONSTANT_SET_FLAGS for PHP < 7.3Olly Betts2019-02-081-1/+1
|
* [php] Fix function constants for PHP 7.3Olly Betts2019-02-082-2/+8
| | | | The code we were generating no longer compiled.
* Fix overloading for non-pointers and NULL - PhpWilliam S Fulton2018-12-302-4/+11
|
* PHP: Make reserved keywords to reserved function only (#1335)Alexander Gabriel2018-10-291-16/+16
| | | | [php] Make Keywords which are functions reserved functions
* Add support for non-default compare template argument in std::map wrappersWilliam S Fulton2018-10-091-5/+5
|
* Remove support for PHP5Olly Betts2018-06-072-57/+52
| | | | | | | | 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.
* [php] Fix reported descriptor in typemap error messageOlly Betts2017-08-091-1/+1
| | | | | | 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.
* Fix wrapping of references/pointers and qualifiers to member pointersWilliam S Fulton2017-03-161-1/+2
| | | | Also fix Go wrapping of member const function pointers.
* [PHP7] Fix segfault on module unloadOlly Betts2016-12-301-1/+1
| | | | | | | 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.
* Add explicit check for expected PHP versionOlly Betts2016-12-011-0/+5
| | | | | Should give a clearer error if PHP7 bindings are compiled against PHP5 or vice versa.
* [PHP] Fix minor misindentation in generated wrapperOlly Betts2016-12-011-1/+1
|
* [PHP7] Wrap bool constants as PHP booleansOlly Betts2016-11-302-1/+4
| | | | | | | | 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.
* [PHP] Add support for PHP7.Olly Betts2016-11-3011-563/+470
| | | | | | 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
* Fix redundant NULL check in php typemapsWilliam S Fulton2016-10-151-6/+12
| | | | Fix for clang compile error as the address of an array will never be NULL.
* [PHP] Fix "in" typemap for char INPUT[ANY]Olly Betts2016-09-021-1/+1
|
* [PHP] Fix out typemap for member function pointersOlly Betts2016-09-021-5/+1
| | | | | | | | | 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.
* Remove unused SWIG_landfillOlly Betts2016-08-301-3/+0
| | | | | It's not been used in any version of SWIG in the repository, isn't documented, and I can find no trace of user code using it.
* Fix directorin SWIGTYPE typemaps to make a copy as these are used for pass ↵William S Fulton2016-05-141-1/+1
| | | | | | by value. Closes #434
* Php fix for -Wmissing-field-initializers warningWilliam S Fulton2015-12-191-0/+4
| | | | | | | 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.
* Consistent memory initialization in php typemaps.William S Fulton2015-07-302-2/+2
| | | | Memory was only initialized in C and not C++ - potential bug?
* Create director_common.swg for language-indep codeOlly Betts2015-03-121-9/+0
| | | | | Move -DSWIG_DIRECTOR_STATIC handling there, so this is now supported for all languages with director support, not just Python and PHP.
* Fix PHP crash in director_finalizerOlly Betts2015-01-141-2/+1
|
* Add c++11 strongly typed enum support for PHPWilliam S Fulton2014-11-272-2/+2
|
* [PHP] Fix throwing a PHP exception through C++ from a subclassedOlly Betts2014-09-111-3/+5
| | | | | | 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).
* Fix segmentation faults with directors in PHP >= 5.4Olly Betts2014-09-091-1/+1
|
* Add more new PHP5.6 keywordsOlly Betts2014-06-081-0/+22
|
* Fix compiler warnings in generated code when using -std=c++98 -std=gnu89 ↵William S Fulton2014-05-242-3/+3
| | | | -pedantic -Wreturn-type
* Eliminate unused parameter from SWIG_Php_GetModule()Olly Betts2014-04-021-2/+2
|
* [PHP] Pass ZTS context through to t_output_helper() so it worksOlly Betts2014-04-022-8/+8
| | | | | with a ZTS-enabled build of PHP. Reported by Pierre Labastie in github PR#155.
* [PHP] Update the lists of PHP keywords with new ones from PHP 5.4Olly Betts2014-02-191-68/+218
| | | | | | | | | 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.
* Make PHP %keywordwarn message wording consistent with other languagesOlly Betts2014-02-191-2/+2
|
* Whitespace tweaksOlly Betts2014-02-171-4/+4
|
* "if (strlen(msg))" -> "if (msg[0])"Olly Betts2014-02-171-1/+1
|
* Just call strcmp() rather than strlen() twice plus zend_binary_strcmp()Olly Betts2014-02-171-6/+6
|