]> git.proxmox.com Git - mirror_qemu.git/commit
qapi/gen: write _genc/_genh access shims
authorJohn Snow <jsnow@redhat.com>
Mon, 1 Feb 2021 19:37:42 +0000 (14:37 -0500)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 8 Feb 2021 13:15:58 +0000 (14:15 +0100)
commitfd9b1603843df86b430083b583157fe0c352901e
tree6b4cd6828c3fda27d5204cfec40ce539a7f2f437
parent39b2d838f1f8a6c3d2fc4e2eecc45e5554d02af7
qapi/gen: write _genc/_genh access shims

Many places assume they can access these fields without checking them
first to ensure they are defined. Eliminating the _genc and _genh fields
and replacing them with functional properties that check for correct
state can ease the typing overhead by eliminating the Optional[T] return
type.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20210201193747.2169670-12-jsnow@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
scripts/qapi/gen.py