aboutsummaryrefslogtreecommitdiff
path: root/Lib/ocaml/swigmove.i
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/ocaml/swigmove.i')
-rw-r--r--Lib/ocaml/swigmove.i11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/ocaml/swigmove.i b/Lib/ocaml/swigmove.i
new file mode 100644
index 000000000..32f9903bd
--- /dev/null
+++ b/Lib/ocaml/swigmove.i
@@ -0,0 +1,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);
+}