diff --git a/Lib/php/phprun.swg b/Lib/php/phprun.swg index 76eee87da..bec32df61 100644 --- a/Lib/php/phprun.swg +++ b/Lib/php/phprun.swg @@ -19,10 +19,6 @@ extern "C" { #include "ext/standard/php_string.h" #include /* for abort(), used in generated code. */ -/* This indirection is to work around const correctness issues in older PHP. - * FIXME: Remove for PHP7? Or might user code be using it? */ -#define SWIG_ZEND_NAMED_FE(ZN, N, A) ZEND_NAMED_FE(ZN, N, A) - #define SWIG_BOOL_CONSTANT(N, V) REGISTER_BOOL_CONSTANT(#N, V, CONST_CS | CONST_PERSISTENT) #define SWIG_LONG_CONSTANT(N, V) REGISTER_LONG_CONSTANT(#N, V, CONST_CS | CONST_PERSISTENT) #define SWIG_DOUBLE_CONSTANT(N, V) REGISTER_DOUBLE_CONSTANT(#N, V, CONST_CS | CONST_PERSISTENT) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index 51ff6b76f..0ea404209 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -739,8 +739,8 @@ public: } Printv(f_begin, s_vdecl, s_wrappers, NIL); Printv(f_begin, s_arginfo, "\n\n", all_cs_entry, "\n\n", s_entry, - " SWIG_ZEND_NAMED_FE(swig_", module, "_alter_newobject,_wrap_swig_", module, "_alter_newobject,swig_arginfo_2)\n" - " SWIG_ZEND_NAMED_FE(swig_", module, "_get_newobject,_wrap_swig_", module, "_get_newobject,swig_arginfo_1)\n" + " ZEND_NAMED_FE(swig_", module, "_alter_newobject,_wrap_swig_", module, "_alter_newobject,swig_arginfo_2)\n" + " ZEND_NAMED_FE(swig_", module, "_get_newobject,_wrap_swig_", module, "_get_newobject,swig_arginfo_1)\n" " ZEND_FE_END\n};\n\n", NIL); Printv(f_begin, s_init, NIL); Delete(s_header); @@ -840,7 +840,7 @@ public: Printf(all_cs_entry, " PHP_ME(%s,%s,swig_arginfo_%s,%s)\n", cname, fname, arginfo_code, modes); } else { if (overload) - Printf(s, " SWIG_ZEND_NAMED_FE(%(lower)s,%s,swig_arginfo_%s)\n", Getattr(n, "sym:name"), fname, arginfo_code); + Printf(s, " ZEND_NAMED_FE(%(lower)s,%s,swig_arginfo_%s)\n", Getattr(n, "sym:name"), fname, arginfo_code); else Printf(s, " PHP_FE(%s,swig_arginfo_%s)\n", fname, arginfo_code); }