From 18bc3e287b17927584361a2b0ff70a14c64e61b4 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Fri, 2 Apr 2021 08:07:44 +1300 Subject: [PATCH] php: Avoid double underscore in generated code These are reserved by the C++ standard, but we were generating them in the le_swig__... names. --- Source/Modules/php.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index e4fb1a9f3..6d7fe55dd 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -163,15 +163,15 @@ static void SwigPHP_emit_resource_registrations() { } } - // declare le_swig_ to store php registration - Printf(s_vdecl, "static int le_swig_%s=0; /* handle for %s */\n", key, human_name); + // declare le_swig to store php registration + Printf(s_vdecl, "static int le_swig%s=0; /* handle for %s */\n", key, human_name); // register with php - Printf(s_oinit, " le_swig_%s=zend_register_list_destructors_ex" + Printf(s_oinit, " le_swig%s=zend_register_list_destructors_ex" "(%s, NULL, SWIGTYPE%s->name, module_number);\n", key, rsrc_dtor_name, key); // store php type in class struct - Printf(s_oinit, " SWIG_TypeClientData(SWIGTYPE%s,&le_swig_%s);\n", key, key); + Printf(s_oinit, " SWIG_TypeClientData(SWIGTYPE%s,&le_swig%s);\n", key, key); Delete(rsrc_dtor_name);