qapi: Store pragma state in QAPISourceInfo, not global state
commit2a7bbedd7752b77d91eb2db0e8dea23852ce556b
authorMarkus Armbruster <armbru@redhat.com>
Fri, 18 Oct 2019 07:43:40 +0000 (18 09:43 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 22 Oct 2019 07:26:12 +0000 (22 09:26 +0200)
tree9e195329b414ddebd89aed20be85471ca7a6a62d
parentf3d4aa5add400018130e2908a400e6b6a9a94f98
qapi: Store pragma state in QAPISourceInfo, not global state

The frontend can't be run more than once due to its global state.
A future commit will want to do that.

Recent commit "qapi: Move context-sensitive checking to the proper
place" got rid of many global variables already, but pragma state is
still stored in global variables (that's why a pragma directive's
scope is the complete schema).

Move the pragma state to QAPISourceInfo.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191018074345.24034-3-armbru@redhat.com>
scripts/qapi/common.py