aboutsummaryrefslogtreecommitdiff
path: root/Lib/d/swigmove.i
blob: e2eb834064adc193726c42a71e3998dc7f3d92a9 (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, canthrow=1) SWIGTYPE MOVE ($&1_type argp)
%{ argp = ($&1_ltype)$input;
   if (!argp) {
     SWIG_DSetPendingException(SWIG_DIllegalArgumentException, "Attempt to dereference null $1_type");
     return $null;
   }
   SwigValueWrapper< $1_ltype >::reset($1, argp); %}

%typemap(din) SWIGTYPE MOVE "$dclassname.swigRelease($dinput)"