summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-04-21 19:11:21 +1200
committerOlly Betts <olly@survex.com>2021-04-21 19:11:21 +1200
commit5e2114501f0aa37c8692800cc28dc392f104fec1 (patch)
tree001d200da742ccac5a50e9a427ef252e36532d20
parentaf5030bca1ade1dea5e293c58c02218dcde243f3 (diff)
downloadswig-5e2114501f0aa37c8692800cc28dc392f104fec1.tar.gz
Pass NULL instead of an empty zend_function_entry
-rw-r--r--Source/Modules/php.cxx6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index 440c461d5..5740c2559 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -196,10 +196,6 @@ static void SwigPHP_emit_pointer_type_registrations() {
Printf(s_wrappers, " return FAILURE;\n");
Printf(s_wrappers, "}\n\n");
- Printf(s_wrappers, "static zend_function_entry swig_ptr_class_functions[] = {\n");
- Printf(s_wrappers, " ZEND_FE_END\n");
- Printf(s_wrappers, "};\n\n");
-
Printf(s_oinit, "\n /* Register classes to represent non-class pointer types */\n");
Printf(s_oinit, " memcpy(&swig_ptr_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));\n");
Printf(s_oinit, " swig_ptr_object_handlers.offset = XtOffsetOf(swig_object_wrapper, std);\n");
@@ -217,7 +213,7 @@ static void SwigPHP_emit_pointer_type_registrations() {
Printf(s_oinit, "{\n");
Printf(s_oinit, " zend_class_entry internal_ce;\n");
- Printf(s_oinit, " INIT_CLASS_ENTRY(internal_ce, \"%s\\\\%s\", swig_ptr_class_functions);\n", "SWIG", type);
+ Printf(s_oinit, " INIT_CLASS_ENTRY(internal_ce, \"%s\\\\%s\", NULL);\n", "SWIG", type);
Printf(s_oinit, " SWIGTYPE_%s_ce = zend_register_internal_class(&internal_ce);\n", type);
Printf(s_oinit, " SWIGTYPE_%s_ce->create_object = swig_ptr_object_new;\n", type);
Printf(s_oinit, " SWIG_TypeClientData(SWIGTYPE%s,SWIGTYPE_%s_ce);\n", type, type);