Use $1 instead of result in out typemaps

This commit is contained in:
Olly Betts 2021-04-21 17:44:24 +12:00
commit 49d5909b08

View file

@ -96,8 +96,8 @@
/* If exit was via exception, PHP NULL is returned so skip the conversion. */
if (!EG(exception)) {
if ($needNewFlow) {
tmp = ($&1_ltype) &SWIG_Z_FETCH_OBJ_P(result)->ptr;
SWIG_Z_FETCH_OBJ_P(result)->newobject = 0;
tmp = ($&1_ltype) &SWIG_Z_FETCH_OBJ_P($1)->ptr;
SWIG_Z_FETCH_OBJ_P($1)->newobject = 0;
} else {
if (SWIG_ConvertPtr($input, (void **) &tmp, $&1_descriptor, 0) < 0 || tmp == NULL) {
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $&1_descriptor");