Fix OUTPUT Typemap not having return statement bug in PHP wrapper.

This commit is contained in:
Nihal 2017-06-27 10:37:07 +05:30 committed by Olly Betts
commit 251d25346d
3 changed files with 6 additions and 2 deletions

View file

@ -7,6 +7,10 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
Version 4.0.0 (in progress)
===========================
2017-06-27: nihaln
[PHP] Update the OUTPUT Typemap to add return statement to the
PHP Wrapper.
2017-06-27: nihaln
[PHP] Update the enum and value examples to use the OO wrappers
rather than the flat functions produced with -noproxy. There's

View file

@ -1841,7 +1841,7 @@ public:
Delete(wrapobj);
}
} else {
if (non_void_return) {
if (non_void_return || hasargout) {
Printf(output, "\t\treturn %s;\n", invoke);
} else if (Cmp(invoke, "$r") != 0) {
Printf(output, "\t\t%s;\n", invoke);

View file

@ -1827,7 +1827,7 @@ public:
Delete(wrapobj);
}
} else {
if (non_void_return) {
if (non_void_return || hasargout) {
Printf(output, "\t\treturn %s;\n", invoke);
} else if (Cmp(invoke, "$r") != 0) {
Printf(output, "\t\t%s;\n", invoke);