aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2012-03-01 12:26:15 +0000
committerIan Campbell <ian.campbell@citrix.com>2012-03-01 12:26:15 +0000
commit23aba672e7221e1a49a1e9662d4a40ca6d375bd2 (patch)
tree7c64d831ad583179e3aa5f191c95cace7d83fafe /tools
parent53ec331a4b49bf45814be6a5a3b57a95392aaa1d (diff)
downloadxen-23aba672e7221e1a49a1e9662d4a40ca6d375bd2.tar.gz
xen-23aba672e7221e1a49a1e9662d4a40ca6d375bd2.tar.bz2
xen-23aba672e7221e1a49a1e9662d4a40ca6d375bd2.zip
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@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/libxl/gentypes.py3
-rw-r--r--tools/libxl/libxl_types.idl2
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index 4a2d0cecca..a70c8d0f65 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -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 --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index d93f40143c..5427835935 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -237,7 +237,6 @@ libxl_domain_build_info = Struct("domain_build_info",[
("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 @@ 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),