Received: from eggs.gnu.org ([2001:4830:134:3::10]:47927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcTsD-0005Ce-9X for qemu-devel@nongnu.org; Thu, 17 Sep 2015 03:44:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcTs8-000280-9j for qemu-devel@nongnu.org; Thu, 17 Sep 2015 03:44:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36267) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcTs8-00027u-4u for qemu-devel@nongnu.org; Thu, 17 Sep 2015 03:44:48 -0400 From: Markus Armbruster References: <1442401589-24189-1-git-send-email-armbru@redhat.com> <1442401589-24189-3-git-send-email-armbru@redhat.com> <55F985D2.90802@redhat.com> Date: Thu, 17 Sep 2015 09:44:44 +0200 In-Reply-To: <55F985D2.90802@redhat.com> (Eric Blake's message of "Wed, 16 Sep 2015 09:08:02 -0600") Message-ID: <87si6dfq1f.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v8 02/26] qapi: New QAPISchema intermediate reperesentation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com Eric Blake 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 >> --- > > >> +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 Thanks!