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:
William S Fulton 2022-08-20 15:40:53 +01:00
commit e139a36511
31 changed files with 931 additions and 46 deletions

View file

@ -692,12 +692,12 @@ Swig::LocalRefGuard $1_refguard(jenv, $input); }
}
%typemap(in) SWIGTYPE & %{ $1 = *($&1_ltype)&$input;
if (!$1) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type reference is null");
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type is null");
return $null;
} %}
%typemap(in, fragment="<memory>") SWIGTYPE && (std::unique_ptr<$*1_ltype> rvrdeleter) %{ $1 = *($&1_ltype)&$input;
if (!$1) {
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type reference is null");
SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "$1_type is null");
return $null;
}
rvrdeleter.reset($1); %}