[PHP] Fix segfault when wrapping a non-class function marked with
%newobject (testcase char_strings). git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ef2a963c89
commit
376adf0e64
2 changed files with 6 additions and 1 deletions
|
|
@ -1749,7 +1749,8 @@ public:
|
|||
}
|
||||
|
||||
Printf(output, "\n");
|
||||
if (wrapperType == memberfn || newobject) {
|
||||
// If it's a member function or a class constructor...
|
||||
if (wrapperType == memberfn || (newobject && current_class)) {
|
||||
Printf(output, "\tfunction %s(%s) {\n", methodname, args);
|
||||
// We don't need this code if the wrapped class has a copy ctor
|
||||
// since the flat function new_CLASSNAME will handle it for us.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue