From 0a72bfc630bc78e5cab0786ecbc2058b2d5f318f Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Tue, 13 Apr 2021 10:18:47 +1200 Subject: [PATCH] Eliminate tempPointer variable --- Lib/php/php.swg | 5 ++--- Source/Modules/php.cxx | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Lib/php/php.swg b/Lib/php/php.swg index 9118bf58e..49c34d0d2 100644 --- a/Lib/php/php.swg +++ b/Lib/php/php.swg @@ -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 diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index 78c095ccf..9c0b89876 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -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;