diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-10-15 22:38:16 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-10-15 22:38:27 +0100 |
commit | 3d46f7dc038f87e00a27e9f294d4115436f1ff23 (patch) | |
tree | 496b69fcaf7ca9e85a136fa661e1a865bf4c2b08 /generator | |
parent | 8a89c728218ecb1c2226d28f9592604b9c2d96ca (diff) | |
download | libguestfs-3d46f7dc038f87e00a27e9f294d4115436f1ff23.tar.gz libguestfs-3d46f7dc038f87e00a27e9f294d4115436f1ff23.tar.xz libguestfs-3d46f7dc038f87e00a27e9f294d4115436f1ff23.zip |
ocaml: Get rid of CAMLprim.
It's wrong to use it, and in any case it doesn't do anything on Linux.
Diffstat (limited to 'generator')
-rw-r--r-- | generator/ocaml.ml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generator/ocaml.ml b/generator/ocaml.ml index 84210490..bf96c153 100644 --- a/generator/ocaml.ml +++ b/generator/ocaml.ml @@ -327,7 +327,7 @@ and generate_ocaml_c () = * the list in reverse order, but hashtables aren't supposed to be * ordered anyway. */ -static CAMLprim value +static value copy_table (char * const * argv) { CAMLparam0 (); @@ -355,7 +355,7 @@ copy_table (char * const * argv) (* Struct copy functions. *) let emit_ocaml_copy_list_function typ = - pr "static CAMLprim value\n"; + pr "static value\n"; pr "copy_%s_list (const struct guestfs_%s_list *%ss)\n" typ typ typ; pr "{\n"; pr " CAMLparam0 ();\n"; @@ -381,7 +381,7 @@ copy_table (char * const * argv) let has_optpercent_col = List.exists (function (_, FOptPercent) -> true | _ -> false) cols in - pr "static CAMLprim value\n"; + pr "static value\n"; pr "copy_%s (const struct guestfs_%s *%s)\n" typ typ typ; pr "{\n"; pr " CAMLparam0 ();\n"; @@ -452,11 +452,11 @@ copy_table (char * const * argv) match ret with RConstOptString _ -> true | _ -> false in pr "/* Emit prototype to appease gcc's -Wmissing-prototypes. */\n"; - pr "CAMLprim value ocaml_guestfs_%s (value %s" name (List.hd params); + pr "value ocaml_guestfs_%s (value %s" name (List.hd params); List.iter (pr ", value %s") (List.tl params); pr ");\n"; pr "\n"; - pr "CAMLprim value\n"; + pr "value\n"; pr "ocaml_guestfs_%s (value %s" name (List.hd params); List.iter (pr ", value %s") (List.tl params); pr ")\n"; @@ -653,9 +653,9 @@ copy_table (char * const * argv) if List.length params > 5 then ( pr "/* Emit prototype to appease gcc's -Wmissing-prototypes. */\n"; - pr "CAMLprim value "; - pr "ocaml_guestfs_%s_byte (value *argv, int argn);\n" name; - pr "CAMLprim value\n"; + pr "value ocaml_guestfs_%s_byte (value *argv, int argn);\n" name; + pr "\n"; + pr "value\n"; pr "ocaml_guestfs_%s_byte (value *argv, int argn ATTRIBUTE_UNUSED)\n" name; pr "{\n"; |