[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: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v8 02/26] qapi: New QAPISchema intermediate reperesentation |
Date: |
Wed, 16 Sep 2015 09:08:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
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)
Should this be self._prefix, since no clients ever directly use the
member field (they just use the string passed through the visitor)?
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature