summaryrefslogtreecommitdiff
path: root/Lib/csharp/swigmove.i
blob: 2f21bd6f7b39d9d8d2c83ceb95bc00ea2d39eaf3 (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, fragment="<memory>") SWIGTYPE MOVE ($&1_type argp)
%{ argp = ($&1_ltype)$input;
   if (!argp) {
     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null $1_type", 0);
     return $null;
   }
   SwigValueWrapper< $1_ltype >::reset($1, argp); %}

%typemap(csin) SWIGTYPE MOVE "$&csclassname.swigRelease($csinput)"