From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Scott Subject: Re: [PATCH v5 09/12] libxl: ocaml: add some missing CAML macros Date: Tue, 26 Nov 2013 18:29:22 +0000 Message-ID: <5294E882.9080002@eu.citrix.com> References: <1385488371-28875-1-git-send-email-rob.hoes@citrix.com> <1385488371-28875-10-git-send-email-rob.hoes@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1385488371-28875-10-git-send-email-rob.hoes@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rob Hoes , xen-devel@lists.xen.org Cc: ian.jackson@citrix.com, Ian Jackson , ian.campbell@citrix.com List-Id: xen-devel@lists.xenproject.org This one (and the later patches in the series the series: ie 10 - 12 inclusive) looks fine to me Acked-by: David Scott On 26/11/13 17:52, Rob Hoes wrote: > Signed-off-by: Rob Hoes > CC: Ian Campbell > CC: Ian Jackson > CC: Dave Scott > --- > tools/ocaml/libs/xl/xenlight_stubs.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c > index 01ba3fe..7012045 100644 > --- a/tools/ocaml/libs/xl/xenlight_stubs.c > +++ b/tools/ocaml/libs/xl/xenlight_stubs.c > @@ -58,6 +58,7 @@ static value Val_error (libxl_error error_c); > > static void failwith_xl(int error, char *fname) > { > + CAMLparam0(); > CAMLlocal1(arg); > static value *exc = NULL; > > @@ -74,6 +75,7 @@ static void failwith_xl(int error, char *fname) > Store_field(arg, 1, caml_copy_string(fname)); > > caml_raise_with_arg(*exc, arg); > + CAMLreturn0; > } > > CAMLprim value stub_raise_exception(value unit) > @@ -337,7 +339,7 @@ static libxl_defbool Defbool_val(value v) > bool b = Bool_val(Some_val(v)); > libxl_defbool_set(&db, b); > } > - return db; > + CAMLreturnT(libxl_defbool, db); > } > > static value Val_hwcap(libxl_hwcap *c_val) > @@ -368,10 +370,11 @@ static value Val_string_option(const char *c_val) > > static char *String_option_val(value v) > { > + CAMLparam1(v); > char *s = NULL; > if (v != Val_none) > s = dup_String_val(Some_val(v)); > - return s; > + CAMLreturnT(char *, s); > } > > #include "_libxl_types.inc" >