summaryrefslogtreecommitdiff
path: root/Lib/ocaml/swigmove.i
blob: 32f9903bd643c24f174ab1af9bdaf33049cf63c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* -----------------------------------------------------------------------------
 * swigmove.i
 *
 * Input typemaps library for implementing full move semantics when passing
 * parameters by value.
 * ----------------------------------------------------------------------------- */

%typemap(in, noblock=1) SWIGTYPE MOVE (void *argp = 0) {
  argp1 = ($&1_ltype) caml_ptr_val($input,$&1_descriptor);
  SwigValueWrapper< $1_ltype >::reset($1, ($&1_type)argp);
}