]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qapi-schema/flat-union-invalid-branch-key.json
qapi: Use 'struct' instead of 'type' in schema
authorEric Blake <eblake@redhat.com>
Mon, 4 May 2015 15:05:27 +0000 (09:05 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 5 May 2015 16:39:01 +0000 (18:39 +0200)
commit895a2a80e0e054f0d5d3715aa93d10d15e49f9f7
tree0edff3d6c1e8261fcb43826537120cc8e297ec95
parent3b2a8b85322f3677525a65c0b35deadf45fb704b
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>
39 files changed:
qapi-schema.json
qapi/block-core.json
qapi/block.json
qapi/common.json
qapi/trace.json
qga/qapi-schema.json
tests/qapi-schema/alternate-array.json
tests/qapi-schema/alternate-base.json
tests/qapi-schema/alternate-conflict-dict.json
tests/qapi-schema/alternate-good.json
tests/qapi-schema/bad-base.json
tests/qapi-schema/bad-ident.json
tests/qapi-schema/bad-type-bool.json
tests/qapi-schema/bad-type-int.err
tests/qapi-schema/bad-type-int.json
tests/qapi-schema/data-member-array.json
tests/qapi-schema/double-data.err
tests/qapi-schema/double-data.json
tests/qapi-schema/double-type.json
tests/qapi-schema/flat-union-bad-base.json
tests/qapi-schema/flat-union-bad-discriminator.json
tests/qapi-schema/flat-union-base-star.json
tests/qapi-schema/flat-union-base-union.json
tests/qapi-schema/flat-union-branch-clash.json
tests/qapi-schema/flat-union-inline.json
tests/qapi-schema/flat-union-int-branch.json
tests/qapi-schema/flat-union-invalid-branch-key.json
tests/qapi-schema/flat-union-invalid-discriminator.json
tests/qapi-schema/flat-union-no-base.json
tests/qapi-schema/flat-union-optional-discriminator.json
tests/qapi-schema/flat-union-reverse-define.json
tests/qapi-schema/flat-union-string-discriminator.json
tests/qapi-schema/qapi-schema-test.json
tests/qapi-schema/redefined-builtin.json
tests/qapi-schema/redefined-type.json
tests/qapi-schema/union-bad-branch.json
tests/qapi-schema/union-base-no-discriminator.json
tests/qapi-schema/union-invalid-base.json
tests/qapi-schema/unknown-expr-key.json