qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v8 02/26] qapi: New QAPISchema intermediate repe


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v8 02/26] qapi: New QAPISchema intermediate reperesentation
Date: Thu, 17 Sep 2015 17:40:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Markus Armbruster <address@hidden> writes:

> Eric Blake <address@hidden> writes:
>
>> On 09/16/2015 05:06 AM, Markus Armbruster wrote:
>>> The QAPI code generators work with a syntax tree (nested dictionaries)
>>> plus a few symbol tables (also dictionaries) on the side.
>>
>>> Nothing uses the new intermediate representation just yet, thus no
>>> change to generated files.
>>> 
>>> Signed-off-by: Markus Armbruster <address@hidden>
>>> ---
>>
>>
>>> +class QAPISchemaEnumType(QAPISchemaType):
>>> +    def __init__(self, name, info, values, prefix):
>>> +        QAPISchemaType.__init__(self, name, info)
>>> +        for v in values:
>>> +            assert isinstance(v, str)
>>> +        self.values = values
>>> +        self.prefix = prefix
>>
>> Missing:
>> assert prefix is None or isinstance(prefix, str)
>
> Yes.
>
>> Should this be self._prefix, since no clients ever directly use the
>> member field (they just use the string passed through the visitor)?
>
> Yes.

Second thoughts: I'll keep self.prefix for consistency.  So far, we use
the _-prefix only for instance variables holding values flowing from
__init__() to check().

> If nothing else comes up in review, I'll touch this up on commit.
>
>> Reviewed-by: Eric Blake <address@hidden>
>
> Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]