OSDN Git Service

qapi-schema: support alternates with array type
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Mar 2022 16:42:41 +0000 (17:42 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 21 Apr 2022 08:11:25 +0000 (10:11 +0200)
commita58069494ded1282c36b7fca8d67bf487c160983
treec6de12c9b556a9b22d3d2bad9d99c6057402daa5
parent9c125d17e9402c232c46610802e5931b3639d77b
qapi-schema: support alternates with array type

Detect array types as alternate branches, and turn the JSON list into
a QAPISchemaArrayType.  Array types in an alternate are represented with
QTYPE_QLIST in the type field.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20220321164243.200569-2-pbonzini@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/expr.py
scripts/qapi/schema.py
tests/qapi-schema/alternate-array.err
tests/qapi-schema/alternate-array.json
tests/qapi-schema/alternate-array.out