diff options
author | Kevin Wolf <kwolf@redhat.com> | 2013-09-18 17:22:02 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-10-11 16:50:01 +0200 |
commit | 14d36307ffdf949df9c1dd7f435e138b36f63bb0 (patch) | |
tree | 54218dd8d67c9ae658b297b9b38b4e4b94f27714 /scripts/qapi-visit.py | |
parent | 52c8d629cac27ad16dd51507b4733d46fa4efc55 (diff) |
qapi-types/visit.py: Pass whole expr dict for structs
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'scripts/qapi-visit.py')
-rw-r--r-- | scripts/qapi-visit.py | 8 |
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) |