diff options
author | Richard Jones <rich@hakodate.home.annexia.org> | 2009-05-06 15:11:40 +0100 |
---|---|---|
committer | Richard Jones <rich@hakodate.home.annexia.org> | 2009-05-06 15:11:40 +0100 |
commit | 76758f42b1abc89d5857697c87ead5036ed81b13 (patch) | |
tree | ee8be13a49e4a36aef94a140c65179303f73b0d0 /ocaml/guestfs_c.c | |
parent | 64847eed1658e7287c51e920e1a600e15b9eb1c2 (diff) | |
download | libguestfs-76758f42b1abc89d5857697c87ead5036ed81b13.tar.gz libguestfs-76758f42b1abc89d5857697c87ead5036ed81b13.tar.xz libguestfs-76758f42b1abc89d5857697c87ead5036ed81b13.zip |
Backport CAMLreturnT for OCaml <= 3.10
Diffstat (limited to 'ocaml/guestfs_c.c')
-rw-r--r-- | ocaml/guestfs_c.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ocaml/guestfs_c.c b/ocaml/guestfs_c.c index 86fa2939..43a85b80 100644 --- a/ocaml/guestfs_c.c +++ b/ocaml/guestfs_c.c @@ -32,6 +32,15 @@ #include "guestfs_c.h" +/* This macro was added in OCaml 3.10. Backport for earlier versions. */ +#ifndef CAMLreturnT +#define CAMLreturnT(type, result) do{ \ + type caml__temp_result = (result); \ + caml_local_roots = caml__frame; \ + return (caml__temp_result); \ +}while(0) +#endif + /* Allocate handles and deal with finalization. */ static void guestfs_finalize (value gv) |