unicorn/qemu/scripts/qapi
Marc-André Lureau 9b10264eea
qapi: leave the ifcond attribute undefined until check()
We commonly initialize attributes to None in .init(), then set their
real value in .check(). Accessing the attribute before .check()
yields None. If we're lucky, the code that accesses the attribute
prematurely chokes on None.

It won't for .ifcond, because None is a legitimate value.

Leave the ifcond attribute undefined until check().

Backports commit 4fca21c1b043cb1ef2e197ef15e7474ba668d925 from qemu
2018-07-05 12:00:10 -04:00
..
__init__.py qapi-gen: New common driver for code and doc generators 2018-03-09 08:47:12 -05:00
common.py qapi: leave the ifcond attribute undefined until check() 2018-07-05 12:00:10 -04:00
events.py qapi/events: generate event enum in main module 2018-06-29 14:19:06 -05:00
types.py qapi: allow empty branches in flat unions 2018-07-02 22:59:43 -04:00
visit.py qapi: allow empty branches in flat unions 2018-07-02 22:59:43 -04:00