summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2021-05-12 15:05:09 +1200
committerOlly Betts <olly@survex.com>2021-05-12 15:05:09 +1200
commit8dadbcc7446430c35cb5119ab17295e990486bf7 (patch)
treee54949ecf2733a9a056e1014afb9a2672657de81 /Source
parentead90be77916ab84729161c7ce08f440a062b609 (diff)
downloadswig-8dadbcc7446430c35cb5119ab17295e990486bf7.tar.gz
[php] Simplify naming of overloaded method wrappers
The underlying wrapper function is now always named using ZEND_NAMED_FUNCTION even if it's a method (in PHP a function and a method only differ in how they're used).
Diffstat (limited to 'Source')
-rw-r--r--Source/Modules/php.cxx14
1 files changed, 2 insertions, 12 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index 6914386f8..ab7aaf375 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -1193,11 +1193,7 @@ public:
}
}
} else {
- if (class_name && Cmp(Getattr(n, "storage"), "friend") != 0) {
- Printv(f->def, "PHP_METHOD(", prefix, class_name, ",", overloadwname, ") {\n", NIL);
- } else {
- Printv(f->def, "ZEND_NAMED_FUNCTION(", overloadwname, ") {\n", NIL);
- }
+ Printv(f->def, "ZEND_NAMED_FUNCTION(", overloadwname, ") {\n", NIL);
}
emit_parameter_variables(l, f);
@@ -1365,13 +1361,7 @@ public:
if (!overloaded) {
Setattr(n, "wrap:name", wname);
} else {
- if (class_name && Cmp(Getattr(n, "storage"), "friend") != 0) {
- String *m_call = NewStringEmpty();
- Printf(m_call, "ZEND_MN(%s_%s)", class_name, overloadwname);
- Setattr(n, "wrap:name", m_call);
- } else {
- Setattr(n, "wrap:name", overloadwname);
- }
+ Setattr(n, "wrap:name", overloadwname);
}
Setattr(n, "wrapper:method:name", wname);