}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)
}
static struct custom_operations guestfs_custom_operations = {
- "guestfs_custom_operations",
+ (char *) "guestfs_custom_operations",
guestfs_finalize,
custom_compare_default,
custom_hash_default,
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)