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:
Miklos Vajna 2009-08-06 13:16:50 +00:00
commit 486419b271

View file

@ -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