aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi-visit.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi-visit.py')
-rw-r--r--scripts/qapi-visit.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/qapi-visit.py b/scripts/qapi-visit.py
index 597cca4b66..1e44004a1e 100644
--- a/scripts/qapi-visit.py
+++ b/scripts/qapi-visit.py
@@ -120,7 +120,11 @@ if (!err) {
''')
return ret
-def generate_visit_struct(name, members):
+def generate_visit_struct(expr):
+
+ name = expr['type']
+ members = expr['data']
+
ret = generate_visit_struct_fields(name, "", "", members)
ret += mcgen('''
@@ -472,7 +476,7 @@ if do_builtins:
for expr in exprs:
if expr.has_key('type'):
- ret = generate_visit_struct(expr['type'], expr['data'])
+ ret = generate_visit_struct(expr)
ret += generate_visit_list(expr['type'], expr['data'])
fdef.write(ret)