Message ID | 20180321115211.17937-23-marcandre.lureau@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
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):
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 <marcandre.lureau@redhat.com> --- scripts/qapi/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)