From 4ff4e123dc68bcadec168185b21fef80f3c4cdc5 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 10 Dec 2021 09:58:12 +0000 Subject: [PATCH] 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 a69cde79ca42e8769c7f9ab10dedecca00478010 (cherry picked from commit b64e9bffc1b8ef8e4086e2f151b975a5e107d307) --- generator/OCaml.ml | 4 ++-- generator/daemon.ml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generator/OCaml.ml b/generator/OCaml.ml index 6b452d912..07a5367f8 100644 --- a/generator/OCaml.ml +++ b/generator/OCaml.ml @@ -353,7 +353,7 @@ module Errno = struct List.iter ( fun e -> 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; pr " let errno_%s = %s ()\n" e le ) ocaml_errnos; @@ -818,7 +818,7 @@ and generate_ocaml_c_errnos () = fun e -> pr "\ -/* NB: \"noalloc\" function. */ +/* NB: [@@noalloc] function. */ value guestfs_int_ocaml_get_%s (value unitv) { diff --git a/generator/daemon.ml b/generator/daemon.ml index b1047427b..4d63a4e8a 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -1179,7 +1179,7 @@ let generate_daemon_optgroups_c () = pr "extern value guestfs_int_daemon_optgroup_%s_available (value);\n" group; pr "\n"; - pr "/* NB: This is a \"noalloc\" call. */\n"; + pr "/* NB: This is a [@@noalloc] call. */\n"; pr "value\n"; pr "guestfs_int_daemon_optgroup_%s_available (value unitv)\n" group; pr "{\n"; @@ -1242,7 +1242,7 @@ let generate_daemon_optgroups_ml () = List.iter ( fun 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 let generate_daemon_optgroups_mli () =