From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58124) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcEJh-0004t9-9t for qemu-devel@nongnu.org; Wed, 16 Sep 2015 11:08:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcEJe-0006jF-4H for qemu-devel@nongnu.org; Wed, 16 Sep 2015 11:08:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcEJd-0006j7-V4 for qemu-devel@nongnu.org; Wed, 16 Sep 2015 11:08:10 -0400 References: <1442401589-24189-1-git-send-email-armbru@redhat.com> <1442401589-24189-3-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <55F985D2.90802@redhat.com> Date: Wed, 16 Sep 2015 09:08:02 -0600 MIME-Version: 1.0 In-Reply-To: <1442401589-24189-3-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CHfc4gJbBl7l8wHU7ADq6GtDGHxG33Ce1" 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: Markus Armbruster , qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CHfc4gJbBl7l8wHU7ADq6GtDGHxG33Ce1 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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 =3D values > + self.prefix =3D 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 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --CHfc4gJbBl7l8wHU7ADq6GtDGHxG33Ce1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJV+YXTAAoJEKeha0olJ0NqKLkH/RRLrFhPwO6TcgRcEWJZFcf2 r2Uz9uWNgw5le8P0QYWrOx3vOhdxy5//jKIJ3gm4IMhMTW7bRyKK5wZILD971OfY 73ST1F7NHMmAA8SSDc7QnZVe8P65PPP94Qn5uzxiDscVGNTFMZiU/3U+kO87FzK8 BtMnzqnBm/kTxv2uw+k4yIm7nw0fVG3c4z9tsophp2YT9SP0vtkg1Xs49dP1wJWV kzWTncgOdJ6YWFHvqsTF59hPqtXDhMsre5NPehFLBpOb2bWLJJ5KIZi1OLrT2XU4 xCGyLLuqNV16USboXDK7qBtzXx2AdVTI8S0VJD2UM1GKAJFrTKHprhec5jHLGDk= =N0Ow -----END PGP SIGNATURE----- --CHfc4gJbBl7l8wHU7ADq6GtDGHxG33Ce1--