mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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: commita69cde79ca(cherry picked from commitb64e9bffc1)
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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 () =
|
||||||
|
|||||||
Reference in New Issue
Block a user