diff options
author | Olly Betts <olly@survex.com> | 2021-12-17 09:38:44 +1300 |
---|---|---|
committer | Olly Betts <olly@survex.com> | 2021-12-17 09:38:44 +1300 |
commit | 5da86a14132ae96d885ef12ad04cf771bdb5dd57 (patch) | |
tree | 5c9d5d0a7a3d3eff5228a712164f948f1536716d | |
parent | 6253583809d66f399cacba251f55bbda6487b6cc (diff) | |
download | swig-5da86a14132ae96d885ef12ad04cf771bdb5dd57.tar.gz |
Make some generated functions static
-rw-r--r-- | Source/Modules/php.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index e778a735d..3a62282d8 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -124,13 +124,13 @@ static void print_creation_free_wrapper(Node *n) { String *s = s_creation; Printf(s, "/* class entry for %s */\n",class_name); - Printf(s, "zend_class_entry *SWIGTYPE_%s_ce;\n\n",class_name); + Printf(s, "static zend_class_entry *SWIGTYPE_%s_ce;\n\n",class_name); Printf(s, "/* class object handlers for %s */\n",class_name); - Printf(s, "zend_object_handlers %s_object_handlers;\n\n",class_name); + Printf(s, "static zend_object_handlers %s_object_handlers;\n\n",class_name); if (Getattr(n, "has_destructor")) { Printf(s, "/* Garbage Collection Method for class %s */\n",class_name); - Printf(s, "void %s_free_storage(zend_object *object) {\n",class_name); + Printf(s, "static void %s_free_storage(zend_object *object) {\n",class_name); Printf(s, " swig_object_wrapper *obj = 0;\n"); Printf(s, " if (!object)\n"); Printf(s, " return;\n"); @@ -155,7 +155,7 @@ static void print_creation_free_wrapper(Node *n) { } Printf(s, "/* Object Creation Method for class %s */\n",class_name); - Printf(s, "zend_object *%s_object_new(zend_class_entry *ce) {\n",class_name); + Printf(s, "static zend_object *%s_object_new(zend_class_entry *ce) {\n",class_name); Printf(s, " swig_object_wrapper *obj = (swig_object_wrapper*)zend_object_alloc(sizeof(swig_object_wrapper), ce);\n"); Printf(s, " zend_object_std_init(&obj->std, ce);\n"); Printf(s, " object_properties_init(&obj->std, ce);\n"); |