summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-05-12 14:58:59 +1200
committerOlly Betts <olly@survex.com>2021-05-12 15:04:31 +1200
commitead90be77916ab84729161c7ce08f440a062b609 (patch)
tree9b669b32614de935181320cc8396428567767002 /Source
parent4ca4283d33fd46e9b1d06eed5fa47cd6f1b0e66f (diff)
downloadswig-ead90be77916ab84729161c7ce08f440a062b609.tar.gz
[php] Fix -prefix when there are subclasses
The calls to the parent class' magic __get, __set and __isset methods weren't getting the prefix.
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/php.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index 4f6399b46..6914386f8 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -941,7 +941,7 @@ public:
}
Printf(f->code, "} else {\n");
if (base_class) {
- Printf(f->code, "PHP_MN(%s___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);\n}\n", base_class);
+ Printf(f->code, "PHP_MN(%s%s___set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);\n}\n", prefix, base_class);
} else {
Printf(f->code, "add_property_zval_ex(ZEND_THIS, ZSTR_VAL(arg2), ZSTR_LEN(arg2), &args[1]);\n}\n");
}
@@ -974,7 +974,7 @@ public:
Printf(f->code, "if(arg->newobject) {\nRETVAL_LONG(1);\n}\nelse {\nRETVAL_LONG(0);\n}\n}\n\n");
Printf(f->code, "else {\n");
if (base_class) {
- Printf(f->code, "PHP_MN(%s___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);\n}\n", base_class);
+ Printf(f->code, "PHP_MN(%s%s___get)(INTERNAL_FUNCTION_PARAM_PASSTHRU);\n}\n", prefix, base_class);
} else {
// __get is only called if the property isn't set on the zend_object.
Printf(f->code, "RETVAL_NULL();\n}\n");
@@ -1008,7 +1008,7 @@ public:
}
Printf(f->code, "else {\n");
if (base_class) {
- Printf(f->code, "PHP_MN(%s___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);\n}\n", base_class);
+ Printf(f->code, "PHP_MN(%s%s___isset)(INTERNAL_FUNCTION_PARAM_PASSTHRU);\n}\n", prefix, base_class);
} else {
// __isset is only called if the property isn't set on the zend_object.
Printf(f->code, "RETVAL_FALSE;\n}\n");