[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/3] libxl_types.idl: use empty Struct for invalid domain type



On Thu, 2014-04-10 at 16:02 +0100, Wei Liu wrote:
> On Thu, Apr 10, 2014 at 03:50:02PM +0100, Ian Campbell wrote:
> [...]
> > > > And if it did could we not detect the use of None with an explicit check
> > > 
> > > gentypes does that already. The result is not generating anything.
> > 
> > So make it generate something? That's just a map_open/map_close isn't
> > it?
> > 
> 
> Yes, that's the whole point of using empty Struct.
> 
> I guess I can go down this route to make it generate empty map,
> achieving the same result like using empty Struct.

Please.

> > > > in the generator somewhere rather than worrying about whether a given
> > > > enum value is valid or invalid? Relying on INVALID would be wrong
> > > 
> > > In the above example we need to skip generation of "u" if we encounter
> > > None or "INVALID". That's back referencing parent in recursive routines
> > > which requires more complex changes.
> > 
> > Which would be needed to push generating map "u" down into the switch?
> > OK to avoiding that then.
> > 
> 
> I think the above approach is cleaner.

Yes.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.