Fix bug in *const& "in" typemaps.
- Refactored the reference check logic to Lib files.
This commit is contained in:
parent
f054f76544
commit
98d1a2f8c5
2 changed files with 3 additions and 2 deletions
|
|
@ -146,7 +146,8 @@
|
|||
%typemap(in) SWIGTYPE *const& ($*ltype temp)
|
||||
%{
|
||||
if ($needNewFlow) {
|
||||
$1 = ($1_ltype) $obj_value;
|
||||
void *tempPointer = $obj_value;
|
||||
$1 = ($1_ltype) &tempPointer;
|
||||
} 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");
|
||||
|
|
|
|||
|
|
@ -1576,7 +1576,7 @@ public:
|
|||
} else {
|
||||
Printf(param_zval, "&%s", source);
|
||||
}
|
||||
Printf(param_value, "%sSWIG_Z_FETCH_OBJ_P(%s)->ptr", SwigType_isreference(pt) ? "&" : "", param_zval);
|
||||
Printf(param_value, "SWIG_Z_FETCH_OBJ_P(%s)->ptr", param_zval);
|
||||
Replaceall(tm, "$obj_value", param_value);
|
||||
}
|
||||
Replaceall(tm, "$needNewFlow", paramType_valid ? (is_class_wrapped(paramType_class) ? "1" : "0") : "0");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue