From a70c713eccd1d1b7aa893f24e07c0e5e6f99cc35 Mon Sep 17 00:00:00 2001 From: Hans-Peter Deifel <hpd@hpdeifel.de> Date: Wed, 7 Dec 2016 01:21:01 +0100 Subject: [PATCH] Fix compilation of gmlmip with newest ocaml The CAMLparam0() macro must be invoked at the beginning of a function that has local variables. --- src/lib/gmlmip_stub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/gmlmip_stub.c b/src/lib/gmlmip_stub.c index 25f8c9d..996f38e 100644 --- a/src/lib/gmlmip_stub.c +++ b/src/lib/gmlmip_stub.c @@ -24,6 +24,7 @@ extern "C" { template<class T> value set2CamlList(const set<T>& vec, value (*f)(const T&)) { + CAMLparam0(); CAMLlocal2( cli, cons ); cli = Val_emptylist; @@ -45,6 +46,7 @@ value set2CamlList(const set<T>& vec, value (*f)(const T&)) { static CAMLprim value pair2caml(const int& t) { + CAMLparam0(); CAMLlocal1( abc ); abc = caml_alloc(2, 0); bool neg = t < 0; -- GitLab