diff options
author | Olly Betts <olly@survex.com> | 2021-12-17 22:32:07 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-12-17 22:32:34 +1300 |
commit | 4672318b427b7d826dd447653f9ddff4900f199d (patch) | |
tree | ad866babcc77ca5bfd33510e528bedb4f3f2c92f | |
parent | cf802c63f2b1192d1c6a6ef764fca22294bd88b3 (diff) | |
download | swig-4672318b427b7d826dd447653f9ddff4900f199d.tar.gz |
Make some generated variables static
-rw-r--r-- | Source/Modules/php.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index f3dac4bfb..510e7ea58 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -78,7 +78,7 @@ static String *fake_class_name() { fake_cs_entry = NewStringf("static zend_function_entry class_%s_functions[] = {\n", result); } - Printf(s_creation, "zend_class_entry *SWIG_Php_ce_%s;\n\n",result); + Printf(s_creation, "static zend_class_entry *SWIG_Php_ce_%s;\n\n",result); Printf(s_oinit, " INIT_CLASS_ENTRY(internal_ce, \"%s\", class_%s_functions);\n", result, result); Printf(s_oinit, " SWIG_Php_ce_%s = zend_register_internal_class(&internal_ce);\n", result); @@ -164,7 +164,7 @@ static void SwigPHP_emit_pointer_type_registrations() { String *type = ki.key; Printf(s_creation, "/* class entry for pointer to %s */\n", type); - Printf(s_creation, "zend_class_entry *SWIG_Php_ce_%s;\n\n", type); + Printf(s_creation, "static zend_class_entry *SWIG_Php_ce_%s;\n\n", type); Printf(s_oinit, " INIT_CLASS_ENTRY(internal_ce, \"%s\\\\%s\", NULL);\n", "SWIG", type); Printf(s_oinit, " SWIG_Php_ce_%s = zend_register_internal_class(&internal_ce);\n", type); |