Eliminate tempPointer variable

This commit is contained in:
Olly Betts 2021-04-13 10:18:47 +12:00
commit 0a72bfc630
2 changed files with 2 additions and 4 deletions

View file

@ -136,14 +136,13 @@
%typemap(in) SWIGTYPE *const& ($*ltype temp)
%{
if ($needNewFlow) {
tempPointer = $obj_value;
$1 = ($1_ltype) &tempPointer;
temp = ($*1_ltype) $obj_value;
} else {
if (SWIG_ConvertPtr(&$input, (void **) &temp, $*1_descriptor, 0) < 0) {
SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $*1_descriptor");
}
$1 = ($1_ltype)&temp;
}
$1 = ($1_ltype)&temp;
%}
%typemap(in) SWIGTYPE *DISOWN

View file

@ -1294,7 +1294,6 @@ public:
if (num_arguments > 0) {
String *args = NewStringEmpty();
Printf(args, "zval args[%d]", num_arguments);
Wrapper_add_local(f, "tempPointer", "void *tempPointer = 0");
Wrapper_add_local(f, "args", args);
Delete(args);
args = NULL;