aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2013-05-10 17:46:01 -0500
committerLuiz Capitulino <lcapitulino@redhat.com>2013-05-23 09:44:20 -0400
commitc664aef551714e91b7d83a28617b6e767db30d11 (patch)
tree83d9276e2dce3abcd4ecbb83e895e9390701f913
parentc0afa9c5f717d0ebf10c70c305974ebbffe4c71f (diff)
qapi: qapi-visit.py, fix list handling for union types
Currently we assume non-list types when generating visitor routines for union types. This is broken, since values like ['Type'] need to mapped to 'TypeList'. We already have a type_name() function to handle this that we use for generating struct visitors, so use that here as well. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Amos Kong <akong@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r--scripts/qapi-visit.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index a276540a18..4c4de4ba08 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -174,7 +174,7 @@ void visit_type_%(name)s(Visitor *m, %(name)s ** obj, const char *name, Error **
''',
abbrev = de_camel_case(name).upper(),
enum = c_fun(de_camel_case(key),False).upper(),
- c_type=members[key],
+ c_type=type_name(members[key]),
c_name=c_fun(key))
ret += mcgen('''