summaryrefslogtreecommitdiff
path: root/scripts/qapi-types.py
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-03-12 20:51:42 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-03-12 20:51:42 -0500
commitfb23ae6e41aad0404154be7af576e76f16466f8e (patch)
treeecdecee94946580232309f51d1498897fe552f49 /scripts/qapi-types.py
parent79122e933cd8bda0917c56c1bdac3f2b8d49fb23 (diff)
parent7e849a9919aac147a768a775014f2eff98e44323 (diff)
downloadqemu-fb23ae6e41aad0404154be7af576e76f16466f8e.tar.gz
Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony: test-coroutine: add performance test for nesting coroutine: adding configure option for sigaltstack coroutine backend coroutine: adding configure choose mechanism for coroutine backend coroutine: adding sigaltstack method (.c source) qcow2: Reduce number of I/O requests qcow2: Add qcow2_alloc_clusters_at() qcow2: Factor out count_cow_clusters qmp: convert blockdev-snapshot-sync to a wrapper around transactions add mode field to blockdev-snapshot-sync transaction item rename blockdev-group-snapshot-sync qapi: complete implementation of unions use QSIMPLEQ_FOREACH_SAFE when freeing list elements Add 'make check-block' make check: Add qemu-iotests subset qemu-iotests: Mark some tests as quick qcow2: Add error messages in qcow2_truncate block: handle -EBUSY in bdrv_commit_all() qcow2: Add some tracing qed: do not evict in-use L2 table cache entries Group snapshot: Fix format name for backing file
Diffstat (limited to 'scripts/qapi-types.py')
-rw-r--r--scripts/qapi-types.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py
index b56225bdaa..727fb77266 100644
--- a/scripts/qapi-types.py
+++ b/scripts/qapi-types.py
@@ -117,6 +117,7 @@ struct %(name)s
{
%(name)sKind kind;
union {
+ void *data;
''',
name=name)
@@ -269,6 +270,7 @@ for expr in exprs:
elif expr.has_key('union'):
ret += generate_fwd_struct(expr['union'], expr['data']) + "\n"
ret += generate_enum('%sKind' % expr['union'], expr['data'].keys())
+ fdef.write(generate_enum_lookup('%sKind' % expr['union'], expr['data'].keys()))
else:
continue
fdecl.write(ret)
@@ -283,6 +285,10 @@ for expr in exprs:
fdef.write(generate_type_cleanup(expr['type']) + "\n")
elif expr.has_key('union'):
ret += generate_union(expr['union'], expr['data'])
+ ret += generate_type_cleanup_decl(expr['union'] + "List")
+ fdef.write(generate_type_cleanup(expr['union'] + "List") + "\n")
+ ret += generate_type_cleanup_decl(expr['union'])
+ fdef.write(generate_type_cleanup(expr['union']) + "\n")
else:
continue
fdecl.write(ret)