[PHP] Stop generating a bogus line of code in certain constructors.
This was mostly harmless, but caused a PHP notice to be issued, if enabled (SF#2985684). git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12033 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9df4479a08
commit
e512093358
2 changed files with 13 additions and 6 deletions
|
|
@ -1,6 +1,11 @@
|
|||
Version 2.0.0 (in progress)
|
||||
============================
|
||||
|
||||
2010-05-21: olly
|
||||
[PHP] Stop generating a bogus line of code in certain constructors.
|
||||
This was mostly harmless, but caused a PHP notice to be issued, if
|
||||
enabled (SF#2985684).
|
||||
|
||||
2010-05-18: wsfulton
|
||||
[Java] Fix member pointers on 64 bit platforms.
|
||||
|
||||
|
|
|
|||
|
|
@ -1495,7 +1495,7 @@ public:
|
|||
Printf(prepare, "case %d: ", ++last_handled_i);
|
||||
}
|
||||
if (Cmp(d, "void") != 0) {
|
||||
if ((!directorsEnabled() || !Swig_directorclass(n)) && !newobject) {
|
||||
if ((!directorsEnabled() || !Swig_directorclass(n)) && !newobject) {
|
||||
Append(prepare, "$r=");
|
||||
} else {
|
||||
Printf(prepare, "$this->%s=", SWIG_PTR);
|
||||
|
|
@ -1631,11 +1631,13 @@ public:
|
|||
Printf(output, "%s", prepare);
|
||||
if (constructor) {
|
||||
if (!directorsEnabled() || !Swig_directorclass(n)) {
|
||||
if (strcmp(methodname, "__construct") == 0) {
|
||||
Printf(output, "\t\t$this->%s=%s;\n", SWIG_PTR, invoke);
|
||||
} else {
|
||||
String *classname = Swig_class_name(current_class);
|
||||
Printf(output, "\t\treturn new %s(%s);\n", classname, invoke);
|
||||
if (!Len(prepare)) {
|
||||
if (strcmp(methodname, "__construct") == 0) {
|
||||
Printf(output, "\t\t$this->%s=%s;\n", SWIG_PTR, invoke);
|
||||
} else {
|
||||
String *classname = Swig_class_name(current_class);
|
||||
Printf(output, "\t\treturn new %s(%s);\n", classname, invoke);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Node *parent = Swig_methodclass(n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue