]> Git Repo - qemu.git/commitdiff
qapi-events: add 'if' condition to implicit event enum
authorMarc-André Lureau <[email protected]>
Thu, 13 Dec 2018 12:37:12 +0000 (16:37 +0400)
committerMarkus Armbruster <[email protected]>
Thu, 13 Dec 2018 18:20:11 +0000 (19:20 +0100)
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 <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Message-Id: <20181213123724[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
scripts/qapi/events.py

index f1b88d8786fc5e94f351524834afc9539472cf86..37ee5de6823ec1c9c9c632fd136b3a648ad64618 100644 (file)
@@ -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):
This page took 0.024639 seconds and 4 git commands to generate.