X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=ocaml%2Fguestfs_c.c;h=f7d8dff8929072f4f9039a16934390fb9ad71d98;hb=22e531bc459309d9a871a845cfacd1396ff5b7e4;hp=62d42d3fad06047f18ec81a012b9dd08af1f229c;hpb=27420d5dcf7ba550751323ea2f27cf45b9146a91;p=libguestfs.git diff --git a/ocaml/guestfs_c.c b/ocaml/guestfs_c.c index 62d42d3..f7d8dff 100644 --- a/ocaml/guestfs_c.c +++ b/ocaml/guestfs_c.c @@ -42,6 +42,10 @@ }while(0) #endif +/* These prototypes are solely to quiet gcc warning. */ +CAMLprim value ocaml_guestfs_create (void); +CAMLprim value ocaml_guestfs_close (value gv); + /* Allocate handles and deal with finalization. */ static void guestfs_finalize (value gv) @@ -89,6 +93,17 @@ ocaml_guestfs_raise_error (guestfs_h *g, const char *func) CAMLnoreturn; } +void +ocaml_guestfs_raise_closed (const char *func) +{ + CAMLparam0 (); + CAMLlocal1 (v); + + v = caml_copy_string (func); + caml_raise_with_arg (*caml_named_value ("ocaml_guestfs_closed"), v); + CAMLnoreturn; +} + /* Guestfs.create */ CAMLprim value ocaml_guestfs_create (void)