[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).
This commit is contained in:
parent
ead90be779
commit
8dadbcc744
1 changed files with 2 additions and 12 deletions
|
|
@ -1193,11 +1193,7 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (class_name && Cmp(Getattr(n, "storage"), "friend") != 0) {
|
Printv(f->def, "ZEND_NAMED_FUNCTION(", overloadwname, ") {\n", NIL);
|
||||||
Printv(f->def, "PHP_METHOD(", prefix, class_name, ",", overloadwname, ") {\n", NIL);
|
|
||||||
} else {
|
|
||||||
Printv(f->def, "ZEND_NAMED_FUNCTION(", overloadwname, ") {\n", NIL);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit_parameter_variables(l, f);
|
emit_parameter_variables(l, f);
|
||||||
|
|
@ -1365,13 +1361,7 @@ public:
|
||||||
if (!overloaded) {
|
if (!overloaded) {
|
||||||
Setattr(n, "wrap:name", wname);
|
Setattr(n, "wrap:name", wname);
|
||||||
} else {
|
} else {
|
||||||
if (class_name && Cmp(Getattr(n, "storage"), "friend") != 0) {
|
Setattr(n, "wrap:name", overloadwname);
|
||||||
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, "wrapper:method:name", wname);
|
Setattr(n, "wrapper:method:name", wname);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue