Eliminate tempPointer variable
This commit is contained in:
parent
93a288c85a
commit
0a72bfc630
2 changed files with 2 additions and 4 deletions
|
|
@ -136,14 +136,13 @@
|
||||||
%typemap(in) SWIGTYPE *const& ($*ltype temp)
|
%typemap(in) SWIGTYPE *const& ($*ltype temp)
|
||||||
%{
|
%{
|
||||||
if ($needNewFlow) {
|
if ($needNewFlow) {
|
||||||
tempPointer = $obj_value;
|
temp = ($*1_ltype) $obj_value;
|
||||||
$1 = ($1_ltype) &tempPointer;
|
|
||||||
} else {
|
} else {
|
||||||
if (SWIG_ConvertPtr(&$input, (void **) &temp, $*1_descriptor, 0) < 0) {
|
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");
|
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
|
%typemap(in) SWIGTYPE *DISOWN
|
||||||
|
|
|
||||||
|
|
@ -1294,7 +1294,6 @@ public:
|
||||||
if (num_arguments > 0) {
|
if (num_arguments > 0) {
|
||||||
String *args = NewStringEmpty();
|
String *args = NewStringEmpty();
|
||||||
Printf(args, "zval args[%d]", num_arguments);
|
Printf(args, "zval args[%d]", num_arguments);
|
||||||
Wrapper_add_local(f, "tempPointer", "void *tempPointer = 0");
|
|
||||||
Wrapper_add_local(f, "args", args);
|
Wrapper_add_local(f, "args", args);
|
||||||
Delete(args);
|
Delete(args);
|
||||||
args = NULL;
|
args = NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue