PHP: fix for the extend_template testcase

The fix is not to handle a %template as a rename by reading the class'
sym:name attribute instead of the ctor's name attribute.

This has been broken in r11510.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11539 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Miklos Vajna 2009-08-12 11:18:58 +00:00
commit 889b156afd

View file

@ -1027,11 +1027,11 @@ public:
if (constructor) {
class_has_ctor = true;
// Skip the Foo:: prefix.
char *ptr = strrchr(GetChar(n, "name"), ':');
char *ptr = strrchr(GetChar(Swig_methodclass(n), "sym:name"), ':');
if (ptr) {
ptr++;
} else {
ptr = GetChar(n, "name");
ptr = GetChar(Swig_methodclass(n), "sym:name");
}
if (strcmp(ptr, GetChar(n, "constructorHandler:sym:name")) == 0) {
methodname = "__construct";