SWIGTYPE && input typemaps now assume object has been moved
Replicated Java implementation. Fully implemented for: - C# - D - Guile - Javascript (UTL) - Lua - MzScheme - Octave (UTL) - Perl (UTL) - PHP - Python (UTL) - Ruby (UTL) - Tcl (UTL) PHP std::auto_ptr std::unique_ptr minor tweaks and testcase corrections
This commit is contained in:
parent
0634883089
commit
e139a36511
31 changed files with 931 additions and 46 deletions
|
|
@ -122,7 +122,7 @@
|
|||
|
||||
%typemap(in, canthrow=1) SWIGTYPE & %{ $1 = ($1_ltype)$input;
|
||||
if (!$1) {
|
||||
SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "$1_type type is null");
|
||||
SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "$1_type is null");
|
||||
return $null;
|
||||
} %}
|
||||
%typemap(out) SWIGTYPE & "$result = (void *)$1;"
|
||||
|
|
@ -157,11 +157,12 @@
|
|||
* Rvalue reference conversion typemaps.
|
||||
*/
|
||||
|
||||
%typemap(in, canthrow=1) SWIGTYPE && %{ $1 = ($1_ltype)$input;
|
||||
%typemap(in, canthrow=1, fragment="<memory>") SWIGTYPE && (std::unique_ptr<$*1_ltype> rvrdeleter) %{ $1 = ($1_ltype)$input;
|
||||
if (!$1) {
|
||||
SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "$1_type type is null");
|
||||
SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "$1_type is null");
|
||||
return $null;
|
||||
} %}
|
||||
}
|
||||
rvrdeleter.reset($1); %}
|
||||
%typemap(out) SWIGTYPE && "$result = (void *)$1;"
|
||||
|
||||
%typemap(directorin) SWIGTYPE &&
|
||||
|
|
@ -182,7 +183,7 @@
|
|||
|
||||
%typemap(din,
|
||||
nativepointer="cast(void*)$dinput"
|
||||
) SWIGTYPE && "$dclassname.swigGetCPtr($dinput)"
|
||||
) SWIGTYPE && "$dclassname.swigRelease($dinput)"
|
||||
%typemap(dout, excode=SWIGEXCODE,
|
||||
nativepointer="{\n auto ret = cast($dtype)$imcall;$excode\n return ret;\n}") SWIGTYPE && {
|
||||
$dclassname ret = new $dclassname($imcall, $owner);$excode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue