unicorn/qemu/scripts/qapi
Marc-André Lureau 7b4961d75b
qapi/events: add #if conditions to events
Wrap generated code with #if/#endif using an 'ifcontext' on
QAPIGenCSnippet objects.

This makes a conditional event's qapi_event_send_FOO() compile-time
conditional, but its enum QAPIEvent member remains unconditional for
now. A follow up patch "qapi-event: add 'if' condition to implicit
event enum" will improve this.

Backports commit c3cd6aa0201c126eda8dc71b60e7aa259a3e79b9 from qemu
2018-07-05 12:09:05 -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: add #if/#endif helpers 2018-07-05 12:07:14 -04:00
events.py qapi/events: add #if conditions to events 2018-07-05 12:09:05 -04:00
types.py qapi: add 'ifcond' to visitor methods 2018-07-05 12:04:07 -04:00
visit.py qapi: add 'ifcond' to visitor methods 2018-07-05 12:04:07 -04:00