summaryrefslogtreecommitdiffstats
path: root/tests/qapi-schema/flat-union-bad-discriminator.err
diff options
context:
space:
mode:
authorMarkus Armbruster2019-10-18 09:43:41 +0200
committerMarkus Armbruster2019-10-22 09:26:12 +0200
commit0002b557b5c8b013087fc18d75d370f11783f619 (patch)
tree90dd293aa8eaac937efba93625f0db5d8d9a6356 /tests/qapi-schema/flat-union-bad-discriminator.err
parentqapi: Store pragma state in QAPISourceInfo, not global state (diff)
downloadqemu-0002b557b5c8b013087fc18d75d370f11783f619.tar.gz
qemu-0002b557b5c8b013087fc18d75d370f11783f619.tar.xz
qemu-0002b557b5c8b013087fc18d75d370f11783f619.zip
qapi: Eliminate accidental global frontend state
The frontend can't be run more than once due to its global state. A future commit will want to do that. The only global frontend state remaining is accidental: QAPISchemaParser.__init__()'s parameter previously_included=[]. Python evaluates the default once, at definition time. Any modifications to it are visible in subsequent calls. Well-known Python trap. Change the default to None and replace it by the real default in the function body. Use the opportunity to convert previously_included to a set. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20191018074345.24034-4-armbru@redhat.com>
Diffstat (limited to 'tests/qapi-schema/flat-union-bad-discriminator.err')
0 files changed, 0 insertions, 0 deletions