Fix to work for classes which aren't called "Foo"...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11531 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
37b9370344
commit
741b90763b
1 changed files with 2 additions and 1 deletions
|
|
@ -1604,7 +1604,8 @@ public:
|
||||||
if (strcmp(methodname, "__construct") == 0) {
|
if (strcmp(methodname, "__construct") == 0) {
|
||||||
Printf(output, "\t\t$this->%s=%s;\n", SWIG_PTR, invoke);
|
Printf(output, "\t\t$this->%s=%s;\n", SWIG_PTR, invoke);
|
||||||
} else {
|
} else {
|
||||||
Printf(output, "\t\treturn new %s(%s);\n", "Foo", invoke);
|
String *classname = Swig_class_name(current_class);
|
||||||
|
Printf(output, "\t\treturn new %s(%s);\n", classname, invoke);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Node *parent = Swig_methodclass(n);
|
Node *parent = Swig_methodclass(n);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue