Fix directorin SWIGTYPE typemaps to make a copy as these are used for pass by value.
Closes #434
This commit is contained in:
parent
b062d998e9
commit
98a31ff633
15 changed files with 180 additions and 14 deletions
|
|
@ -57,7 +57,7 @@
|
|||
#endif
|
||||
|
||||
%typemap(directorin) SWIGTYPE
|
||||
"$input = (void *)&$1;"
|
||||
"$input = (void *)new $1_ltype((const $1_ltype &)$1);"
|
||||
%typemap(directorout) SWIGTYPE
|
||||
%{ if (!$input) {
|
||||
SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "Unexpected null return for type $1_type");
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
}
|
||||
$result = *($&1_ltype)$input; %}
|
||||
|
||||
%typemap(ddirectorin) SWIGTYPE "new $&dclassname($winput, false)"
|
||||
%typemap(ddirectorin) SWIGTYPE "new $&dclassname($winput, true)"
|
||||
%typemap(ddirectorout) SWIGTYPE "$&dclassname.swigGetCPtr($dcall)"
|
||||
|
||||
%typemap(din) SWIGTYPE "$&dclassname.swigGetCPtr($dinput)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue