[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 09:44:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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.
If nothing else comes up in review, I'll touch this up on commit.
> Reviewed-by: Eric Blake <address@hidden>
Thanks!
- [Qemu-devel] [PATCH v8 00/26] qapi: QMP introspection, Markus Armbruster, 2015/09/16
- [Qemu-devel] [PATCH v8 08/26] qapi-commands: Convert to QAPISchemaVisitor, Markus Armbruster, 2015/09/16
- [Qemu-devel] [PATCH v8 01/26] qapi: Rename class QAPISchema to QAPISchemaParser, Markus Armbruster, 2015/09/16
- [Qemu-devel] [PATCH v8 06/26] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, Markus Armbruster, 2015/09/16
- [Qemu-devel] [PATCH v8 14/26] qapi-visit: Rearrange code a bit, Markus Armbruster, 2015/09/16