php: Fix overloaded directed methods with non-void return
We were treating such methods like constructors and assigning to the internal _cPtr, which just seems bizarrely wrong. Fixes #1900
This commit is contained in:
parent
57cb95318a
commit
2e7da86b2c
4 changed files with 34 additions and 3 deletions
|
|
@ -1566,7 +1566,7 @@ public:
|
|||
Printf(prepare, "case %d: ", ++last_handled_i);
|
||||
}
|
||||
if (non_void_return) {
|
||||
if ((!directorsEnabled() || !Swig_directorclass(n)) && !constructor) {
|
||||
if (!constructor) {
|
||||
Append(prepare, "$r=");
|
||||
} else if (wrapperType == staticmemberfn || wrapperType == staticmembervar) {
|
||||
Append(prepare, "$r=");
|
||||
|
|
@ -1590,7 +1590,7 @@ public:
|
|||
if (had_a_case)
|
||||
Printf(prepare, "default: ");
|
||||
if (non_void_return) {
|
||||
if ((!directorsEnabled() || !Swig_directorclass(n)) && !constructor) {
|
||||
if (!constructor) {
|
||||
Append(prepare, "$r=");
|
||||
} else if (wrapperType == staticmemberfn || wrapperType == staticmembervar) {
|
||||
Append(prepare, "$r=");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue