summaryrefslogtreecommitdiff
path: root/Lib/java/swigmove.i
blob: 671b988af6e60ecf7e83c1eb82d5442467da6719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* -----------------------------------------------------------------------------
 * swigmove.i
 *
 * Input typemaps library for implementing full move semantics when passing
 * parameters by value.
 * ----------------------------------------------------------------------------- */

%typemap(in) SWIGTYPE MOVE ($&1_type argp)
%{ argp = *($&1_ltype*)&$input; 
   if (!argp) {
     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "Attempt to dereference null $1_type");
     return $null;
   }
  SwigValueWrapper< $1_ltype >::reset($1, argp); %}

%typemap(javain) SWIGTYPE MOVE "$&javaclassname.swigRelease($javainput)"