[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: idl: generate KeyedUnion key member as part of the KeyedUnion
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1330604775 0 # Node ID aa30f4cfde89eba61ee43fe3a15c1823d5880cad # Parent 5b850e935e37845ed0a7571447b81a5f0567861a libxl: idl: generate KeyedUnion key member as part of the KeyedUnion Rather than specifying it twice in the IDL. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 5b850e935e37 -r aa30f4cfde89 tools/libxl/gentypes.py --- a/tools/libxl/gentypes.py Thu Mar 01 12:26:15 2012 +0000 +++ b/tools/libxl/gentypes.py Thu Mar 01 12:26:15 2012 +0000 @@ -32,6 +32,9 @@ s += "} %s" % ty.typename elif isinstance(ty, idl.Aggregate): + if isinstance(ty, idl.KeyedUnion): + s += libxl_C_instance_of(ty.keyvar.type, ty.keyvar.name) + ";\n" + if ty.typename is None: s += "%s {\n" % ty.kind else: diff -r 5b850e935e37 -r aa30f4cfde89 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Thu Mar 01 12:26:15 2012 +0000 +++ b/tools/libxl/libxl_types.idl Thu Mar 01 12:26:15 2012 +0000 @@ -237,7 +237,6 @@ ("shadow_memkb", MemKB), ("disable_migrate", libxl_defbool), ("cpuid", libxl_cpuid_policy_list), - ("type", libxl_domain_type), ("device_model_version", libxl_device_model_version), ("device_model_stubdomain", libxl_defbool), @@ -447,7 +446,6 @@ ("domid", libxl_domid), ("domuuid", libxl_uuid), ("for_user", libxl_ev_user), - ("type", libxl_event_type), ("u", KeyedUnion(None, libxl_event_type, "type", [("domain_shutdown", Struct(None, [ ("shutdown_reason", uint8), _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |