Commit graph

19 commits

Author SHA1 Message Date
Olly Betts
87c2e7d71a [php] Fix long long handling on 32 bit platforms
The typemaps for long long and unsigned long long didn't handle a
string input correctly, and long_long_runme.php had a flawed test
in this case.

Fixes #2155
2022-01-22 13:09:34 +13:00
Olly Betts
1f1349741f
[php] Generate PHP type declarations
We now automatically generate PHP type declarations for PHP >= 8.0.

The generated code still compiles with PHP 7.x but without type declarations.
2022-01-20 10:07:44 +13:00
Olly Betts
50426aae20 Make PHP directors work more like other languages
A PHP exception now gets translated to a C++ exception to skips over C++
code to get back to PHP, avoiding the need to gate every directorout
typemap on EG(exception).
2021-04-22 14:40:21 +12:00
Olly Betts
175b8d8542 Fix -Wimplicit-fallthrough warnings
We already have the magic comment to do this, but they weren't in
quite the right place.
2021-04-19 16:54:36 +12:00
Olly Betts
97733543e2 Fix directorout typemap for const TYPE &
Previous we were returning a pointer or reference to a local
variable.
2021-04-15 12:50:32 +12:00
Olly Betts
a0720885bd Remove PHP-specific avoidance of uninitialised variable
This code is no longer needed since
ebd37155a8 addressed this more
generically.
2019-02-11 10:49:20 +13:00
Olly Betts
1169874f59 [PHP] Add support for PHP7.
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
2016-11-30 13:05:59 +13:00
William S Fulton
3191473523 Fix compiler warnings in generated code when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type 2014-05-24 14:13:19 +01:00
Olly Betts
18c00e20bc [PHP] Pass ZTS context through to t_output_helper() so it works
with a ZTS-enabled build of PHP.  Reported by Pierre Labastie in
github PR#155.
2014-04-02 23:28:56 +13:00
Olly Betts
cecd89f66f [PHP] The usage of $input in PHP directorout typemaps has been
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  ***
2013-12-12 15:40:15 +13:00
Olly Betts
52bdfa3097 Add input typemaps for long long and unsigned long long for PHP.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11765 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-03 01:29:45 +00:00
Miklos Vajna
6f80e2f7a6 PHP: Add directorout typemap for primitive type const refs
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11559 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 04:22:03 +00:00
William S Fulton
cc43f20f6d PHP fix const char\*\& typemaps and add in char_strings runtime test based on Java version
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 23:31:19 +00:00
William S Fulton
627d9faffd Add PHP const ref typemaps for primitive types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11549 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-13 21:41:23 +00:00
Olly Betts
1f01eb5d7d [PHP] Fix memory leak in PHP OUTPUT typemaps. Reported by Hitoshi
Amano in SF#2826322.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11464 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 02:27:54 +00:00
Miklos Vajna
0249eea389 Merge https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-vmiklos/
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11434 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-22 11:08:29 +00:00
Olly Betts
16c8749768 [PHP5] Change the default input typemap for char * to turn PHP
Null into C NULL (previously it was converted to an empty string).
The new behaviour is consistent with how the corresponding output
typemap works.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10864 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-18 14:02:15 +00:00
Olly Betts
30cdd1f71e Make t_output_helper() static.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-03 06:04:24 +00:00
Olly Betts
7dfd9aae31 WARN_* constants are user visible, so keep existing WARN_PHP4_* for
backward compatibility, but add preferred forms WARN_PHP_* and use
these ourselves.

Rename Lib/php4 to Lib/php, Source/Modules/php4.cxx to Source/Modules/php.cxx.
 
Add typemaps for const reference so Examples/test-suite/apply_signed_char.i
works.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-07-03 00:09:56 +00:00
Renamed from Lib/php4/utils.i (Browse further)