[PHP] Fix handling of OUTPUT typemaps (Patch from Ryan in SF#3058394).

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12208 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2010-09-08 02:40:56 +00:00
commit a25ccbf58b
3 changed files with 20 additions and 13 deletions

View file

@ -915,8 +915,10 @@ public:
}
/* Insert argument output code */
bool hasargout = false;
for (i = 0, p = l; p; i++) {
if ((tm = Getattr(p, "tmap:argout"))) {
hasargout = true;
Replaceall(tm, "$source", Getattr(p, "lname"));
// Replaceall(tm,"$input",Getattr(p,"lname"));
Replaceall(tm, "$target", "return_value");
@ -1663,7 +1665,7 @@ public:
}
}
Printf(output, "%s", prepare);
} else if (Cmp(d, "void") == 0) {
} else if (Cmp(d, "void") == 0 && !hasargout) {
if (Cmp(invoke, "$r") != 0)
Printf(output, "\t\t%s;\n", invoke);
} else if (is_class(d)) {