[php] Fix place where class prefix (as specified with -prefix)

wasn't being used.  Patch from gverbruggen in SF#2892647.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11736 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2009-11-13 07:15:08 +00:00
commit dd5714ea28
2 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,10 @@
Version 1.3.41 (in progress)
============================
2009-11-13: olly
[php] Fix place where class prefix (as specified with -prefix)
wasn't being used. Patch from gverbruggen in SF#2892647.
2009-11-12: wsfulton
Fix usage of nested template classes so that compileable code is generated - the nested
template class is now treated like a normal nested classes that is as an opaque type

View file

@ -1684,7 +1684,7 @@ public:
Printf(output, "\t\t\t$c='%s'.substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));\n", prefix);
}
Printf(output, "\t\t\tif (!class_exists($c)) {\n");
Printf(output, "\t\t\t\treturn new %s($r);\n", Getattr(classLookup(d), "sym:name"));
Printf(output, "\t\t\t\treturn new %s%s($r);\n", prefix, Getattr(classLookup(d), "sym:name"));
Printf(output, "\t\t\t}\n");
Printf(output, "\t\t\treturn new $c($r);\n");
} else {