generator: Replace more "noalloc" with [@@noalloc]

In some places in the generator we were still generating "noalloc".
It was hidden from the previous regexp I used to replace these because
of string escaping.

Updates: commit a69cde79ca
(cherry picked from commit b64e9bffc1)
This commit is contained in:
Richard W.M. Jones
2021-12-10 09:58:12 +00:00
parent d306db36c8
commit 4ff4e123dc
2 changed files with 4 additions and 4 deletions

View File

@@ -353,7 +353,7 @@ module Errno = struct
List.iter ( List.iter (
fun e -> fun e ->
let le = String.lowercase_ascii e in let le = String.lowercase_ascii e in
pr " external %s : unit -> int = \"guestfs_int_ocaml_get_%s\" \"noalloc\"\n" pr " external %s : unit -> int = \"guestfs_int_ocaml_get_%s\" [@@noalloc]\n"
le e; le e;
pr " let errno_%s = %s ()\n" e le pr " let errno_%s = %s ()\n" e le
) ocaml_errnos; ) ocaml_errnos;
@@ -818,7 +818,7 @@ and generate_ocaml_c_errnos () =
fun e -> fun e ->
pr "\ pr "\
/* NB: \"noalloc\" function. */ /* NB: [@@noalloc] function. */
value value
guestfs_int_ocaml_get_%s (value unitv) guestfs_int_ocaml_get_%s (value unitv)
{ {

View File

@@ -1179,7 +1179,7 @@ let generate_daemon_optgroups_c () =
pr "extern value guestfs_int_daemon_optgroup_%s_available (value);\n" pr "extern value guestfs_int_daemon_optgroup_%s_available (value);\n"
group; group;
pr "\n"; pr "\n";
pr "/* NB: This is a \"noalloc\" call. */\n"; pr "/* NB: This is a [@@noalloc] call. */\n";
pr "value\n"; pr "value\n";
pr "guestfs_int_daemon_optgroup_%s_available (value unitv)\n" group; pr "guestfs_int_daemon_optgroup_%s_available (value unitv)\n" group;
pr "{\n"; pr "{\n";
@@ -1242,7 +1242,7 @@ let generate_daemon_optgroups_ml () =
List.iter ( List.iter (
fun group -> fun group ->
pr "external %s_available : unit -> bool =\n" group; pr "external %s_available : unit -> bool =\n" group;
pr " \"guestfs_int_daemon_optgroup_%s_available\" \"noalloc\"\n" group pr " \"guestfs_int_daemon_optgroup_%s_available\" [@@noalloc]\n" group
) optgroups_names ) optgroups_names
let generate_daemon_optgroups_mli () = let generate_daemon_optgroups_mli () =