[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2-resend 02/30] libxl: idl: allow KeyedUnion members to be empty
On Tue, 2013-08-27 at 15:53 +0100, Ian Jackson wrote: > Rob Hoes writes ("[Xen-devel] [PATCH v2-resend 02/30] libxl: idl: allow > KeyedUnion members to be empty"): > > This is useful when the key enum has an "invalid" option and avoids > > the need to declare a dummy struct. Use this for domain_build_info > > resulting in the generated API changing like so: > > --- tools/libxl/_libxl_BACKUP_types.h > > +++ tools/libxl/_libxl_types.h > > @@ -377,8 +377,6 @@ typedef struct libxl_domain_build_info { > > const char * features; > > libxl_defbool e820_host; > > } pv; > > - struct { > > - } invalid; > > } u; > > I assume that the problem here is that the compiler rejects the empty > struct. I don't recall exactly, but I think so. > > > - ("invalid", Struct(None, [])), > > + ("invalid", None), > > Is it really necessary to do this with a special-cased new "None" type > rather than just fixing the empty structs by putting a dummy member in > them ? I'd rather a bit of skaniness in the idl compiler than in the end user facing eventual API. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |