summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-04-02 07:59:35 +1300
committerOlly Betts <olly@survex.com>2021-04-02 07:59:35 +1300
commitd2a0956766b3cf0d70008940f1c4512cf26ba1d4 (patch)
tree8f3d127c5c58212ab49e972afa99c4cc5d37fd66 /Source
parenta1abc692d3d0f6721c878619b4aed2a6792edbde (diff)
downloadswig-d2a0956766b3cf0d70008940f1c4512cf26ba1d4.tar.gz
Remove NULL check which can never be NULL
A pointer to a struct member can't be NULL!
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/php.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index 34886077d..e628efb21 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -144,8 +144,7 @@ static void print_creation_free_wrapper(Node *n) {
Printf(s, " SWIG_remove((%s *)obj->ptr);\n", Getattr(n, "classtype"));
}
- Printf(s, " if(&obj->std)\n");
- Printf(s, " zend_object_std_dtor(&obj->std);\n}\n\n\n");
+ Printf(s, " zend_object_std_dtor(&obj->std);\n}\n\n\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);