[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 20/50] qapi-event: add 'if' condition to gene
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH v3 20/50] qapi-event: add 'if' condition to generated enum |
Date: |
Fri, 08 Dec 2017 15:07:28 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Markus Armbruster <address@hidden> writes:
> Marc-André Lureau <address@hidden> writes:
>
>> Add condition to QAPIEvent enum members based on the event 'if'.
>>
>> Signed-off-by: Marc-André Lureau <address@hidden>
>> ---
>> scripts/qapi-event.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/qapi-event.py b/scripts/qapi-event.py
>> index 38f4264817..60c6f7030d 100644
>> --- a/scripts/qapi-event.py
>> +++ b/scripts/qapi-event.py
>> @@ -168,7 +168,7 @@ class QAPISchemaGenEventVisitor(QAPISchemaVisitor):
>> def visit_event(self, name, info, ifcond, arg_type, boxed):
>> self.decl += gen_event_send_decl(name, arg_type, boxed)
>> self.defn += gen_event_send(name, arg_type, boxed)
>> - self._event_names.append(QAPISchemaMember(name))
>> + self._event_names.append(QAPISchemaMember(name, ifcond))
>>
>>
>> (input_file, output_dir, do_c, do_h, prefix, dummy) = parse_command_line()
>
> No test coverage?
Wait! This patch has no effect, because the it merely puts the ifcond
argument into QAPISchemaMember.ifcond. Only later patches put
QAPISchemaMember.ifcond to use. Correct?
Aside: the ifcond_decorator could already be doing something with the
argument, but I'll be hanged if I remember how that magic works.