[PHP] Don't generate "return $r;" in cases where $r hasn't been set.
This was basically harmless, except it generated a PHP E_NOTICE if the calling code had enabled them. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
56c3805922
commit
210266cd70
2 changed files with 10 additions and 1 deletions
|
|
@ -5,6 +5,11 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 2.0.5 (in progress)
|
||||
===========================
|
||||
|
||||
2011-07-29: olly
|
||||
[PHP] Don't generate "return $r;" in cases where $r hasn't been set.
|
||||
This was basically harmless, except it generated a PHP E_NOTICE if
|
||||
the calling code had enabled them.
|
||||
|
||||
2011-07-26: wsfulton
|
||||
Fix scoping of forward class declarations nested within a class (for C++). Previously the symbol
|
||||
was incorrectly put into the outer namespace, eg
|
||||
|
|
|
|||
|
|
@ -1773,7 +1773,11 @@ public:
|
|||
Printf(output, "\t\t}\n");
|
||||
}
|
||||
} else {
|
||||
Printf(output, "\t\treturn %s;\n", invoke);
|
||||
if (non_void_return) {
|
||||
Printf(output, "\t\treturn %s;\n", invoke);
|
||||
} else if (Cmp(invoke, "$r") != 0) {
|
||||
Printf(output, "\t\t%s;\n", invoke);
|
||||
}
|
||||
}
|
||||
Printf(output, "\t}\n");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue