|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: Introduce LIBXL_DOMAIN_TYPE_INVALID to make gcc happy
On Wed, 2012-05-23 at 15:36 +0100, Ian Jackson wrote:
> > if isinstance(ty, idl.KeyedUnion):
> > if parent is None:
> > raise Exception("KeyedUnion type must have a parent")
> > s += "switch (%s) {\n" % (parent + ty.keyvar.name)
> > for f in ty.fields:
> > (nparent,fexpr) = ty.member(v, f, parent is None)
> > s += "case %s:\n" % f.enumname
> > s += libxl_C_type_dispose(f.type, fexpr, indent + " ",
> > nparent)
> > s += " break;\n"
> > + s += "default:\n break;\n";
> > s += "}\n"
> >
> > Would it make sense?
>
> No, I don't think so. Surely the idl should contain an explicitly
> empty structure ?
>
Well, that would work either, of course. :-)
Here's what I did, and it builds cleanly:
diff -r 6dc80df50fa8 tools/libxl/libxl_types.idl
--- a/tools/libxl/libxl_types.idl Tue May 22 16:30:11 2012 +0200
+++ b/tools/libxl/libxl_types.idl Wed May 23 17:19:52 2012 +0200
@@ -315,6 +316,7 @@ libxl_domain_build_info = Struct("domain
# Use host's E820 for PCI passthrough.
("e820_host", libxl_defbool),
])),
+ ("invalid", Struct(None, [])),
], keyvar_init_val = "-1")),
New patch coming in a separate thread.
Thanks,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)
Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |