[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v8 10/22] qapi-events: add 'if' condition to implici
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH v8 10/22] qapi-events: add 'if' condition to implicit event enum |
Date: |
Thu, 13 Dec 2018 16:37:12 +0400 |
Add condition to QAPIEvent enum members based on the event 'if'.
The generated code remains unconditional for now. Later patches
generate the conditionals (also there is no additional coverage of
this change in qapi-schema-test.out since the event_names enum is an
implicit type created by qapi/events.py).
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <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 f1b88d8786..37ee5de682 100644
--- a/scripts/qapi/events.py
+++ b/scripts/qapi/events.py
@@ -179,7 +179,7 @@ class QAPISchemaGenEventVisitor(QAPISchemaModularCVisitor):
self._genh.add(gen_event_send_decl(name, arg_type, boxed))
self._genc.add(gen_event_send(name, arg_type, boxed,
self._event_enum_name))
- self._event_enum_members.append(QAPISchemaMember(name))
+ self._event_enum_members.append(QAPISchemaMember(name, ifcond))
def gen_events(schema, output_dir, prefix):
--
2.20.0
- [Qemu-devel] [PATCH v8 04/22] qapi: factor out checking for keys, (continued)
- [Qemu-devel] [PATCH v8 04/22] qapi: factor out checking for keys, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 05/22] qapi: improve reporting of unknown or missing keys, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 06/22] qapi: add a dictionary form with 'name' key for enum members, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 07/22] qapi: pass long form enum to make_enum_members, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 08/22] qapi: simplify make_enum_members(), Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 09/22] qapi: add 'if' to enum members, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 10/22] qapi-events: add 'if' condition to implicit event enum,
Marc-André Lureau <=
- [Qemu-devel] [PATCH v8 11/22] qapi: rename allow_dict to allow_implicit, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 13/22] qapi: add 'if' to implicit struct members, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 12/22] qapi: add a dictionary form for TYPE, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 14/22] qapi: add an error in case a discriminator is conditional, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 15/22] qapi: add 'if' to union members, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 16/22] qapi: add 'if' to alternate members, Marc-André Lureau, 2018/12/13
- [Qemu-devel] [PATCH v8 17/22] qapi: add #if conditions to generated code members, Marc-André Lureau, 2018/12/13