]> Git Repo - qemu.git/commit - scripts/qapi/common.py
qapi: pass 'if' condition into QAPISchemaEntity objects
authorMarc-André Lureau <[email protected]>
Tue, 3 Jul 2018 15:56:36 +0000 (17:56 +0200)
committerMarkus Armbruster <[email protected]>
Tue, 3 Jul 2018 16:38:53 +0000 (18:38 +0200)
commit2cbc94376e718448699036be7f6e29ab75312b70
treea2b397a37ac0b7342eae3ff553e4c128aad15cf7
parent967c885108f18e5065744719f7959ba5ea0a5b0d
qapi: pass 'if' condition into QAPISchemaEntity objects

Built-in objects remain unconditional.  Explicitly defined objects use
the condition specified in the schema.  Implicitly defined objects
inherit their condition from their users.  For most of them, there is
exactly one user, so the condition to use is obvious.  The exception
is wrapped types generated for simple union variants, which can be
shared by any number of simple unions.  The tight condition would be
the disjunction of the conditions of these simple unions.  For now,
use the wrapped type's condition instead.  Much simpler and good
enough for now.

Signed-off-by: Marc-André Lureau <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-Id: <20180703155648[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
scripts/qapi/common.py
This page took 0.0228390000000001 seconds and 4 git commands to generate.