PHP: Skip the Foo:: prefix when detecting ctor renames
This fixes a few testcases (like the mixed_types one) I broke in the previous commit. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11512 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
09b20003fb
commit
486419b271
1 changed files with 8 additions and 1 deletions
|
|
@ -1026,7 +1026,14 @@ public:
|
|||
String *output = s_oowrappers;
|
||||
if (constructor) {
|
||||
class_has_ctor = true;
|
||||
if (strcmp(GetChar(n, "name"), GetChar(n, "constructorHandler:sym:name")) == 0) {
|
||||
// Skip the Foo:: prefix.
|
||||
char *ptr = strrchr(GetChar(n, "name"), ':');
|
||||
if (ptr) {
|
||||
ptr++;
|
||||
} else {
|
||||
ptr = GetChar(n, "name");
|
||||
}
|
||||
if (strcmp(ptr, GetChar(n, "constructorHandler:sym:name")) == 0) {
|
||||
methodname = "__construct";
|
||||
} else {
|
||||
// The class has multiple constructors and this one is
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue