[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2-resend 04/30] libxl: idl: complete some enums in the IDL with their defaults
On Tue, 2013-09-10 at 11:57 +0100, Ian Campbell wrote: > On Tue, 2013-08-27 at 15:56 +0100, Ian Jackson wrote: > > Rob Hoes writes ("[Xen-devel] [PATCH v2-resend 04/30] libxl: idl: complete > > some enums in the IDL with their defaults"): > > > There are several enums in the IDL that are initialised to 0, while > > > the value 0 is not part of the enum itself. This creates problems for > > > language bindings generated from the IDL, such as the OCaml ones. > > > > > > Added an explicit (0, "UNKNOWN") enum value where appropriate, or used > > > init_val to default to a sensible value. > > > > Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > > Applied. I think we don't need a raft of LIBXL_HAVE defines in this case, the addition is really for the benefit of autogenerated language bindings, anyone using C who cares about supporting older APIs would just use 0 and not do: #ifdef LIBXL_HAVE_A_THING enum thing foo = LIBXL_HAVE_A_THING #else num thing foo = 0; #endif Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |