From ca8f8afcc5b5b77be69f5b353ed8aef3fae1883d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 30 May 2019 09:45:40 +0200 Subject: [PATCH] Revert "daemon: implement OptString for OCaml APIs" This causes the build to fail, as Val_optstring is still not used by any generated C glue function. This reverts commit 8e51e9078f0204008b262e14cbde3123b545ec37. --- generator/daemon.ml | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/generator/daemon.ml b/generator/daemon.ml index c2b7c79a2..a4e136aaa 100644 --- a/generator/daemon.ml +++ b/generator/daemon.ml @@ -600,22 +600,6 @@ let generate_daemon_caml_stubs () = #include \"actions.h\" #include \"daemon-c.h\" -static CAMLprim value -Val_optstring (const char *s) -{ - CAMLparam0 (); - CAMLlocal2 (optv, v); - - if (s) { /* Return Some val */ - v = caml_copy_string (s); - optv = caml_alloc (1, 0); - Field (optv, 0) = v; - } else /* Return None */ - optv = Val_int (0); - - CAMLreturn (optv); -} - "; (* Implement code for returning structs and struct lists. *) @@ -813,7 +797,7 @@ Val_optstring (const char *s) | String ((Mountable|Mountable_or_Path), n) -> pr "guestfs_int_daemon_copy_mountable (%s)" n | String _ -> assert false - | OptString n -> pr "Val_optstring (%s)" n + | OptString _ -> assert false | StringList _ -> assert false | BufferIn _ -> assert false | Pointer _ -> assert false