From 895a2a80e0e054f0d5d3715aa93d10d15e49f9f7 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 4 May 2015 09:05:27 -0600 Subject: 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 Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- tests/qapi-schema/flat-union-branch-clash.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/qapi-schema/flat-union-branch-clash.json') diff --git a/tests/qapi-schema/flat-union-branch-clash.json b/tests/qapi-schema/flat-union-branch-clash.json index 4091477b04..8b0b807a03 100644 --- a/tests/qapi-schema/flat-union-branch-clash.json +++ b/tests/qapi-schema/flat-union-branch-clash.json @@ -1,11 +1,11 @@ # FIXME: we should check for no duplicate keys between branches and base { 'enum': 'TestEnum', 'data': [ 'value1', 'value2' ] } -{ 'type': 'Base', +{ 'struct': 'Base', 'data': { 'enum1': 'TestEnum', 'name': 'str' } } -{ 'type': 'Branch1', +{ 'struct': 'Branch1', 'data': { 'name': 'str' } } -{ 'type': 'Branch2', +{ 'struct': 'Branch2', 'data': { 'value': 'int' } } { 'union': 'TestUnion', 'base': 'Base', -- cgit v1.2.3