From 889b156afd1c6220f36827cdd49bae3b3618b901 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Wed, 12 Aug 2009 11:18:58 +0000 Subject: [PATCH] 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 --- Source/Modules/php.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index c4c6bab25..44fe032a5 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -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";