unicorn/qemu/scripts
Eric Blake d7014c66df
qapi: Add type.is_empty() helper
In the near future, we want to lift our artificial restriction of
no variants at the top level of an event, at which point the
currently open-coded check for empty members will become
insufficient. Factor it out into a new helper method is_empty()
now, and future-proof it by checking variants, too, along with an
assert that it is not used prior to the completion of .check().
Update places that were checking for (non-)empty .members to use
the new helper.

All of the current callers assert that there are no variants (either
directly, or by qapi.py asserting that base types have no variants),
so this is not a semantic change.

No change to generated code.

Backports commit b6167706829c6e0d3572daa2b6769594ced276f7 from qemu
2018-02-25 20:07:43 -05:00
..
create_config more cleanup qemu/configure 2017-01-19 14:11:54 +08:00
make_device_config.sh fix file perms 2015-08-28 21:05:38 -07:00
ordereddict.py import 2015-08-21 15:04:50 +08:00
qapi-event.py qapi: Add type.is_empty() helper 2018-02-25 20:07:43 -05:00
qapi-types.py qapi: Add type.is_empty() helper 2018-02-25 20:07:43 -05:00
qapi-visit.py qapi: Add parameter to visit_end_* 2018-02-25 00:57:54 -05:00
qapi.py qapi: Add type.is_empty() helper 2018-02-25 20:07:43 -05:00