ocaml: Change calls to caml_named_value() to cope with const value* return.

In OCaml >= 4.09 the return value pointer of caml_named_value is
declared const.

Based on Pino Toscano's original patch to ocaml-augeas.

(cherry picked from commit 74ce7332db)
This commit is contained in:
Richard W.M. Jones
2019-09-05 09:00:14 +01:00
parent 3b4082b239
commit 96462b30d5

View File

@@ -746,7 +746,7 @@ let generate_daemon_caml_stubs () =
let nr_args = List.length args_do_function in
pr "{\n";
pr " static value *cb = NULL;\n";
pr " static const value *cb = NULL;\n";
pr " CAMLparam0 ();\n";
pr " CAMLlocal2 (v, retv);\n";
pr " CAMLlocalN (args, %d);\n"