qapi: Split up check_type()
commit06cc46eeaf3cf5790c85ebbb58e8875719e5eb86
authorMarkus Armbruster <armbru@redhat.com>
Thu, 16 Mar 2023 07:13:15 +0000 (16 08:13 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 24 Apr 2023 13:21:28 +0000 (24 15:21 +0200)
tree559e210d383829c80805ed88442c02599f3010f1
parent607045ba39f6ca845ede3131a902ad785088fea3
qapi: Split up check_type()

check_type() can check type names, arrays, and implicit struct types.
Callers pass flags to select from this menu.  This makes the function
somewhat hard to read.  Moreover, a few minor bugs are hiding in
there, as we'll see shortly.

Split it into check_type_name(), check_type_name_or_array(), and
check_type_name_or_implicit().  Each of them is a copy of the original
specialized to a certain set of flags.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230316071325.492471-5-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
[Commit message corrected]
scripts/qapi/expr.py