From 23aba672e7221e1a49a1e9662d4a40ca6d375bd2 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 1 Mar 2012 12:26:15 +0000 Subject: libxl: idl: generate KeyedUnion key member as part of the KeyedUnion Rather than specifying it twice in the IDL. Signed-off-by: Ian Campbell --- tools/libxl/gentypes.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/libxl/gentypes.py') 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: -- cgit v1.2.3