From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsvEm-00081u-Cf for qemu-devel@nongnu.org; Thu, 14 May 2015 11:39:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsvEg-0007Jz-KO for qemu-devel@nongnu.org; Thu, 14 May 2015 11:39:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsvEg-0007Jq-E5 for qemu-devel@nongnu.org; Thu, 14 May 2015 11:39:46 -0400 Message-ID: <5554C1C0.7010903@redhat.com> Date: Thu, 14 May 2015 09:39:44 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431607862-9238-1-git-send-email-eblake@redhat.com> <1431607862-9238-9-git-send-email-eblake@redhat.com> In-Reply-To: <1431607862-9238-9-git-send-email-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ce8KnBQWqv39ROjTM99CLPC32Mf7R1HS8" Subject: Re: [Qemu-devel] [PATCH v4 08/16] qapi: Tidy c_type logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, akong@redhat.com, berto@igalia.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Ce8KnBQWqv39ROjTM99CLPC32Mf7R1HS8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/14/2015 06:50 AM, Eric Blake wrote: > c_type() is designed to be called on both string names and on > array designations, so 'name' is a bit misleading because it > operates on more than strings. Also, no caller ever passes > an empty string. Finally, + notation is a bit nicer to read > than '%s' % value for string concatenation. >=20 > Signed-off-by: Eric Blake >=20 > --- > else: > - return '%s *%s' % (name, eatspace) > + # complex type name > + assert isinstance(value, str) and str !=3D "" D'oh - that should be 'value !=3D ""'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Ce8KnBQWqv39ROjTM99CLPC32Mf7R1HS8 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/ iQEcBAEBCAAGBQJVVMHAAAoJEKeha0olJ0NqvwAIAK3AgGFH8M0kNevCgMTnI0cW Ea1ghdv27yLtriiXjnDXBe7q0Msm56KAAY/7hKuUFkOKpZIcmmMBZ8faavyjz5rQ U5IMDS/ktvICVSI3OWfZX7b2ez34eZNgHxHd2xRzPMurLpSyRXRAnZS3LWztjLQ6 pFZCftSvaCcSU6VTFcv5LIm81rns6SBkPO6SrTRA/udUL59/t+ZVZ8mWCHChbKvg P9vWx2p8rvtCjX+IcmBdvrB09Tgq9EibjyC5DfdgsVLparyqSdWesFPtJGywpsT3 +Bp/JaTeigOtewd7iSwWURk2WF5nYVok8wOXwInHfT10F0KCPM2cSvxGZ1kv3Lk= =sLs2 -----END PGP SIGNATURE----- --Ce8KnBQWqv39ROjTM99CLPC32Mf7R1HS8--