[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 22 of 23] libxl: idl: generate KeyedUnion key member as part of the KeyedUnion
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1329150454 0 # Node ID ba485f9fce317ba31a96b407f5712ba62239e223 # Parent 0751a69b3ef2264844500c47151b5e16a358e02d 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 0751a69b3ef2 -r ba485f9fce31 tools/libxl/gentypes.py --- a/tools/libxl/gentypes.py Mon Feb 13 16:27:34 2012 +0000 +++ b/tools/libxl/gentypes.py Mon Feb 13 16:27:34 2012 +0000 @@ -32,6 +32,9 @@ def libxl_C_type_define(ty, indent = "") 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 0751a69b3ef2 -r ba485f9fce31 tools/libxl/libxl_types.idl --- a/tools/libxl/libxl_types.idl Mon Feb 13 16:27:34 2012 +0000 +++ b/tools/libxl/libxl_types.idl Mon Feb 13 16:27:34 2012 +0000 @@ -214,7 +214,6 @@ libxl_domain_build_info = Struct("domain ("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), @@ -421,7 +420,6 @@ libxl_event = Struct("event",[ ("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-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |