From: Ian Campbell Subject: Re: [PATCH 27 of 32 RFC] libxl: use defbool for graphics related options Date: Mon, 16 Jan 2012 16:40:11 +0000 Message-ID: <1326732011.14689.27.camel@zakaz.uk.xensource.com> References: <20244.20398.698055.75483@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20244.20398.698055.75483@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Mon, 2012-01-16 at 16:26 +0000, Ian Jackson wrote: > Ian Campbell writes ("[Xen-devel] [PATCH 27 of 32 RFC] libxl: use defbool for graphics related options"): > > libxl: use defbool for graphics related options > ... > > diff -r 81def18dfda0 -r b8426902efa0 tools/ocaml/libs/xl/xenlight_stubs.c > > --- a/tools/ocaml/libs/xl/xenlight_stubs.c Fri Jan 13 16:17:49 2012 +0000 > > +++ b/tools/ocaml/libs/xl/xenlight_stubs.c Fri Jan 13 17:04:57 2012 +0000 > > @@ -130,6 +130,19 @@ static int string_string_tuple_array_val > > > > #endif > > > > +/* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */ > > +#define Val_none Val_int(0) > > +#define Some_val(v) Field(v,0) > ... > > +static value Val_some(value v) > > +{ > ... > > I wasn't expecting to find this at the end of this patch. I think this is the first time a struct which is covered by the ocaml stubs used a defbool. It's tricky to do this in a staged manner because you get all sorts of "unused static function" warnings. Ian.