Fix mangling of PHP constructor wrapper when types use global scope or typedefs
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12309 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e0c82f6f2b
commit
004643ff30
1 changed files with 2 additions and 3 deletions
|
|
@ -1601,10 +1601,9 @@ public:
|
||||||
Delete(args);
|
Delete(args);
|
||||||
args = NewString("$res=null");
|
args = NewString("$res=null");
|
||||||
}
|
}
|
||||||
SwigType *t = Getattr(current_class, "classtype");
|
String *mangled_type = SwigType_manglestr(Getattr(n, "type"));
|
||||||
String *mangled_type = SwigType_manglestr(SwigType_ltype(t));
|
|
||||||
Printf(output, "\t%sfunction %s(%s) {\n", acc, methodname, args);
|
Printf(output, "\t%sfunction %s(%s) {\n", acc, methodname, args);
|
||||||
Printf(output, "\t\tif (is_resource($%s) && get_resource_type($%s) === '_p%s') {\n", arg0, arg0, mangled_type);
|
Printf(output, "\t\tif (is_resource($%s) && get_resource_type($%s) === '%s') {\n", arg0, arg0, mangled_type);
|
||||||
Printf(output, "\t\t\t$this->%s=$%s;\n", SWIG_PTR, arg0);
|
Printf(output, "\t\t\t$this->%s=$%s;\n", SWIG_PTR, arg0);
|
||||||
Printf(output, "\t\t\treturn;\n");
|
Printf(output, "\t\t\treturn;\n");
|
||||||
Printf(output, "\t\t}\n");
|
Printf(output, "\t\t}\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue