From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3YZm-0008CK-Rj for qemu-devel@nongnu.org; Fri, 12 Jun 2015 19:41:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z3YZi-00071A-Pl for qemu-devel@nongnu.org; Fri, 12 Jun 2015 19:41:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z3YZi-000716-Jf for qemu-devel@nongnu.org; Fri, 12 Jun 2015 19:41:26 -0400 Message-ID: <557B6E24.7010700@redhat.com> Date: Fri, 12 Jun 2015 17:41:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <1434120674-8122-1-git-send-email-armbru@redhat.com> <1434120674-8122-10-git-send-email-armbru@redhat.com> In-Reply-To: <1434120674-8122-10-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="P1VocsrDqcUKJGQtWvuhBw8qORvvA9pH7" Subject: Re: [Qemu-devel] [PATCH 09/16] qapi: Move exprs checking from parse_schema() to check_exprs() 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) --P1VocsrDqcUKJGQtWvuhBw8qORvvA9pH7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/12/2015 08:51 AM, Markus Armbruster wrote: > To have expression semantic analysis in one place rather than two. >=20 > Signed-off-by: Markus Armbruster > --- > scripts/qapi.py | 142 ++++++++++++++++++++++++++----------------------= -------- > 1 file changed, 66 insertions(+), 76 deletions(-) Again, yay for a good testsuite proving this doesn't mess things up :) > + > + return map(lambda expr_elem: expr_elem['expr'], exprs) I had to go research what this actually does, but it looks correct. > =20 > def parse_schema(fname): > - global all_names > - exprs =3D [] > - > - # First pass: read entire file into memory > try: > schema =3D QAPISchema(open(fname, "r")) > + return check_exprs(schema.exprs) > except (QAPISchemaError, QAPIExprError), e: > print >>sys.stderr, e > exit(1) Wow, that's really just a thin wrapper now! Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --P1VocsrDqcUKJGQtWvuhBw8qORvvA9pH7 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/ iQEcBAEBCAAGBQJVe24kAAoJEKeha0olJ0NqFfgH/1ktXNc4Xegj2vLzB570T5ts kvh/fAu1rOK5c2ynFlcKQqNXkeu8xtZkD4QxOb4s0rzZFUtHeapwNpheriLIlz3K C2bKpGDw+r1o24eI7aiDIUQpPr0DVRhQR9EEyt7OdIaXyOL7BeNT1h8rBgr5f8yE JVwrCM/6eWZNbPZiw/UDvkgmAWuc/Uj8qfeV75P/aiBPxRwwGCca71/QmO7lvgF2 VQCutnYBVNayVoqf9XMp9YFbRVSZaXgTorELUqYWgk4AZiSr7AwrOgVphAwzDXcV scL3lmFm2z7pRphz41Ue3Aw072zWIlCUAWMlju/fQtp4RVzffko0kFbllyIuPw4= =Gl1f -----END PGP SIGNATURE----- --P1VocsrDqcUKJGQtWvuhBw8qORvvA9pH7--