git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64847ee
)
Backport CAMLreturnT for OCaml <= 3.10
author
Richard Jones
<rich@hakodate.home.annexia.org>
Wed, 6 May 2009 14:11:40 +0000
(15:11 +0100)
committer
Richard Jones
<rich@hakodate.home.annexia.org>
Wed, 6 May 2009 14:11:40 +0000
(15:11 +0100)
ocaml/guestfs_c.c
patch
|
blob
|
history
diff --git
a/ocaml/guestfs_c.c
b/ocaml/guestfs_c.c
index
86fa293
..
43a85b8
100644
(file)
--- 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)