aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/gentypes.py
diff options
context:
space:
mode:
authorIan Jackson <ian.jackson@eu.citrix.com>2011-12-12 17:48:39 +0000
committerIan Jackson <ian.jackson@eu.citrix.com>2011-12-12 17:48:39 +0000
commit966e43d7ad9c5feb6beab487955264516140052d (patch)
treeac971e4f7543f034756b1dfd5ff47330056f3975 /tools/libxl/gentypes.py
parenteee7480fdf1e874cc91b73e9646c487b5e02c99a (diff)
downloadxen-966e43d7ad9c5feb6beab487955264516140052d.tar.gz
xen-966e43d7ad9c5feb6beab487955264516140052d.tar.bz2
xen-966e43d7ad9c5feb6beab487955264516140052d.zip
libxl: idl: Provide struct and union tags
Instead of generating: typedef struct { ... } libxl_foo; Produce: typedef struct libxl_foo { ... } libxl_foo; This makes it possible to refer to libxl idl-generated structs and unions, as incomplete types, before they have been defined. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/gentypes.py')
-rw-r--r--tools/libxl/gentypes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index d8f43e3173..7ca63755ac 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -56,7 +56,7 @@ def libxl_C_type_define(ty, indent = ""):
if ty.typename is None:
s += "%s {\n" % ty.kind
else:
- s += "typedef %s {\n" % ty.kind
+ s += "typedef %s %s {\n" % (ty.kind, ty.typename)
for f in ty.fields:
if f.comment is not None: