diff options
author | Eric Blake <eblake@redhat.com> | 2015-05-04 09:05:27 -0600 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2015-05-05 18:39:01 +0200 |
commit | 895a2a80e0e054f0d5d3715aa93d10d15e49f9f7 (patch) | |
tree | 0edff3d6c1e8261fcb43826537120cc8e297ec95 /qapi/common.json | |
parent | 3b2a8b85322f3677525a65c0b35deadf45fb704b (diff) |
qapi: Use 'struct' instead of 'type' in schema
Referring to "type" as both a meta-type (built-in, enum, union,
alternate, or struct) and a specific type (the name that the
schema uses for declaring structs) is confusing. Do the bulk of
the conversion to "struct" in qapi schema, with a fairly
mechanical:
for f in `find -name '*.json'; do sed -i "s/'type'/'struct'/"; done
followed by manually filtering out the places where we have a
'type' embedded in 'data'. Then tweak a couple of tests whose
output changes slightly due to longer lines.
I also verified that the generated files for QMP and QGA (such
as qmp-commands.h) are the same before and after, as assurance
that I didn't leave in any accidental member name changes.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi/common.json')
-rw-r--r-- | qapi/common.json | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qapi/common.json b/qapi/common.json index 63ef3b4724..12431c691b 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -50,7 +50,7 @@ # # Since: 0.14.0 ## -{ 'type': 'VersionInfo', +{ 'struct': 'VersionInfo', 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, 'package': 'str'} } @@ -74,7 +74,7 @@ # # Since: 0.14.0 ## -{ 'type': 'CommandInfo', 'data': {'name': 'str'} } +{ 'struct': 'CommandInfo', 'data': {'name': 'str'} } ## # @query-commands: |