diff options
author | Olly Betts <olly@survex.com> | 2016-11-30 13:05:59 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2016-11-30 13:05:59 +1300 |
commit | 1169874f598d3b4078ec34a8001330838f83c7f7 (patch) | |
tree | bea5491420cfe54b5b279d40599861d5d1588ee9 /Lib/exception.i | |
parent | bb98147965083798815ab938ec369c6a17abd9fc (diff) | |
download | swig-1169874f598d3b4078ec34a8001330838f83c7f7.tar.gz |
[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
Diffstat (limited to 'Lib/exception.i')
-rw-r--r-- | Lib/exception.i | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/exception.i b/Lib/exception.i index c8509987b..da0d56cdd 100644 --- a/Lib/exception.i +++ b/Lib/exception.i @@ -12,13 +12,20 @@ %insert("runtime") "swigerrors.swg" -#ifdef SWIGPHP +#ifdef SWIGPHP5 %{ #include "zend_exceptions.h" #define SWIG_exception(code, msg) do { zend_throw_exception(NULL, (char*)msg, code TSRMLS_CC); goto thrown; } while (0) %} #endif +#ifdef SWIGPHP7 +%{ +#include "zend_exceptions.h" +#define SWIG_exception(code, msg) do { zend_throw_exception(NULL, (char*)msg, code); goto thrown; } while (0) +%} +#endif + #ifdef SWIGGUILE %{ SWIGINTERN void SWIG_exception_ (int code, const char *msg, |