mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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>
This commit is contained in:
parent
9c125d17e9
commit
a58069494d
5 changed files with 23 additions and 5 deletions
|
@ -554,7 +554,7 @@ def check_alternate(expr: _JSONObject, info: QAPISourceInfo) -> None:
|
|||
check_name_lower(key, info, source)
|
||||
check_keys(value, info, source, ['type'], ['if'])
|
||||
check_if(value, info, source)
|
||||
check_type(value['type'], info, source)
|
||||
check_type(value['type'], info, source, allow_array=True)
|
||||
|
||||
|
||||
def check_command(expr: _JSONObject, info: QAPISourceInfo) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue