Eric Blake <ebl...@redhat.com> writes: > We were missing the 'size' builtin type (which means that QAPI using > [ 'size' ] would fail to compile).
I suspect it chokes on 'size' in anonymous unions, too. > Futhermore, there was some > redundancy between builtin_types[] and builtin_type_qtypes{}. > > Signed-off-by: Eric Blake <ebl...@redhat.com> Split off "[PATCH v4 10/19] qapi: Better error messages for duplicated expressions". Good. > --- > scripts/qapi-types.py | 10 +++++----- > scripts/qapi-visit.py | 6 +++--- > scripts/qapi.py | 9 ++------- > tests/qapi-schema/qapi-schema-test.json | 3 ++- > tests/qapi-schema/qapi-schema-test.out | 2 +- > 5 files changed, 13 insertions(+), 17 deletions(-) > > diff --git a/scripts/qapi-types.py b/scripts/qapi-types.py > index db87218..e400b03 100644 > --- a/scripts/qapi-types.py > +++ b/scripts/qapi-types.py > @@ -182,8 +182,8 @@ const int %(name)s_qtypes[QTYPE_MAX] = { > > for key in members: > qapi_type = members[key] > - if builtin_type_qtypes.has_key(qapi_type): > - qtype = builtin_type_qtypes[qapi_type] > + if builtin_types.has_key(qapi_type): > + qtype = builtin_types[qapi_type] > elif find_struct(qapi_type): > qtype = "QTYPE_QDICT" > elif find_union(qapi_type): Took me a bit of digging to make the connection to "there was some redundancy between builtin_types[] and builtin_type_qtypes{}", and to the patch to qapi.py. You could split this patch up: one part for folding _qtypes into _types, and another part for fixing 'size'. Not worth a respin by itself, so: Reviewed-by: Markus Armbruster <arm...@redhat.com> [...]