[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 22/49] qapi-event: add 'if' condition to implicit
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v3 22/49] qapi-event: add 'if' condition to implicit event enum |
Date: |
Wed, 21 Mar 2018 12:51:44 +0100 |
Add condition to QAPIEvent enum members based on the event 'if'.
Generated code is not changed by this patch, but with "qapi: add #if
conditions to generated code" patch.
There is no coverage of this change in qapi-schema-test.out since the
event_names enum is an implicit type created by qapi-event.py.
Signed-off-by: Marc-André Lureau <address@hidden>
---
scripts/qapi/events.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi/events.py b/scripts/qapi/events.py
index 233c27a6c8..f02b65cf5a 100644
--- a/scripts/qapi/events.py
+++ b/scripts/qapi/events.py
@@ -188,7 +188,7 @@ class QAPISchemaGenEventVisitor(QAPISchemaModularCVisitor):
with ifcontext(ifcond, self._genh, self._genc):
self._genh.add(gen_event_send_decl(name, arg_type, boxed))
self._genc.add(gen_event_send(name, arg_type, boxed,
self._enum_name))
- self._event_names.append(QAPISchemaMember(name))
+ self._event_names.append(QAPISchemaMember(name, ifcond))
def gen_events(schema, output_dir, prefix):
--
2.16.2.521.g9aa15f885a
- [Qemu-devel] [PATCH v3 12/49] qapi/events: add #if conditions to events, (continued)
- [Qemu-devel] [PATCH v3 12/49] qapi/events: add #if conditions to events, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 13/49] qapi-types: refactor variants handling, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 14/49] qapi-types: add #if conditions to types & visitors, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 15/49] qapi: do not define enumeration value explicitely, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 16/49] qapi: rename QAPISchemaEnumType.values to .members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 17/49] qapi: change enum visitor to take QAPISchemaMember, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 18/49] tests: modify visit_enum_type() in test-qapi to print members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 19/49] qapi: factor out check_known_keys(), Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 20/49] qapi: add a dictionnary form with 'name' key for enum members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 21/49] qapi: add 'if' to enum members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 22/49] qapi-event: add 'if' condition to implicit event enum,
Marc-André Lureau <=
- [Qemu-devel] [PATCH v3 23/49] qapi: rename allow_dict to allow_implicit, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 25/49] qapi: add 'if' to implicit struct members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 24/49] qapi: add a dictionary form with 'type' key for members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 26/49] qapi: add an error in case a discriminator is conditionnal, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 27/49] qapi: add 'if' on union members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 28/49] qapi: add 'if' to alternate members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 29/49] qapi: add #if conditions to generated code members, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 32/49] qapi2texi: add 'If:' condition to enum values, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 30/49] docs: document schema configuration, Marc-André Lureau, 2018/03/21
- [Qemu-devel] [PATCH v3 31/49] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2018/03/21