diff --git a/Lib/php/php.swg b/Lib/php/php.swg index 6cb88062c..9118bf58e 100644 --- a/Lib/php/php.swg +++ b/Lib/php/php.swg @@ -148,12 +148,8 @@ %typemap(in) SWIGTYPE *DISOWN %{ - if ($needNewFlow) { - SWIG_Z_FETCH_OBJ_P(&$input)->newobject = 0; - $1 = ($lower_param *)SWIG_Z_FETCH_OBJ_P(&$input)->ptr; - } else { - if (SWIG_ConvertPtr(&$input, (void **) &$1, $1_descriptor, SWIG_POINTER_DISOWN ) < 0) - SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $1_descriptor"); + if (SWIG_ConvertPtr(&$input, (void **) &$1, $1_descriptor, SWIG_POINTER_DISOWN) < 0) { + SWIG_PHP_Error(E_ERROR, "Type error in argument $argnum of $symname. Expected $1_descriptor"); } %} diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index 4880c9c2f..7d31483bd 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -1388,7 +1388,6 @@ public: String *temp_obj = NewStringEmpty(); Printf(temp_obj, "&%s", ln); Replaceall(tm, "$obj_value", is_param_type_pointer(resolved ? resolved : pt) ? "NULL" : temp_obj); // Adding this to compile. It won't reach this if $obj_val is required. - Replaceall(tm, "$lower_param", paramType_class); Setattr(p, "emit:input", source); Printf(f->code, "%s\n", tm); if (i == 0 && Getattr(p, "self")) {