From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoHRH-00018F-Vj for qemu-devel@nongnu.org; Fri, 01 May 2015 16:21:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoHRD-0001LQ-SE for qemu-devel@nongnu.org; Fri, 01 May 2015 16:21:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoHRD-0001LC-Kw for qemu-devel@nongnu.org; Fri, 01 May 2015 16:21:31 -0400 Message-ID: <5543E020.5040208@redhat.com> Date: Fri, 01 May 2015 14:20:48 -0600 From: Eric Blake MIME-Version: 1.0 References: <1430312814-19706-1-git-send-email-eblake@redhat.com> <1430312814-19706-37-git-send-email-eblake@redhat.com> In-Reply-To: <1430312814-19706-37-git-send-email-eblake@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pxQxOijS06jXgc4b34UMjrLXCkE5cpfI2" Subject: Re: [Qemu-devel] [PATCH v7 36/39] qapi: Drop support for inline nested types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, berto@igalia.com, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pxQxOijS06jXgc4b34UMjrLXCkE5cpfI2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/29/2015 07:06 AM, Eric Blake wrote: > A future patch will be using a 'name':{dictionary} entry in the > QAPI schema to specify a default value for an optional argument > (see previous commit messages for more details why); but existing > use of inline nested structs conflicts with that goal. Now that > all commands have been changed to avoid inline nested structs, > nuke support for them, and turn it into a hard error. Update the > testsuite to reflect tighter parsing rules. >=20 > Signed-off-by: Eric Blake > Reviewed-by: Markus Armbruster > --- > scripts/qapi-commands.py | 8 +++--- > scripts/qapi-event.py | 4 +-- > scripts/qapi-types.py | 9 ++----- > scripts/qapi-visit.py | 37 ++++----------------= -------- > scripts/qapi.py | 20 ++++++--------- > +++ b/scripts/qapi-visit.py > @@ -51,27 +51,6 @@ def generate_visit_struct_fields(name, field_prefix,= fn_prefix, members, base =3D > else: > full_name =3D "%s_%s" % (name, fn_prefix) >=20 > - for argname, argentry, optional, structured in parse_args(members)= : > - if structured: > - if not fn_prefix: > - nested_fn_prefix =3D argname > - else: > - nested_fn_prefix =3D "%s_%s" % (fn_prefix, argname) > - > - nested_field_prefix =3D "%s%s." % (field_prefix, argname) > - ret +=3D generate_visit_struct_fields(name, nested_field_p= refix, > - nested_fn_prefix, arge= ntry) This is the only place that calls generate_visit_struct_fields with a non-empty string for prefix arguments; I've got a cleanup patch that we can either squash into this patch or leave as standalone. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pxQxOijS06jXgc4b34UMjrLXCkE5cpfI2 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/ iQEcBAEBCAAGBQJVQ+AgAAoJEKeha0olJ0NqR0UIAIatz+2HBLFEYLgfaq7KRl0L K1ppvZcsinuq8vTY3QaN1825OSTwYKktX4VQ2MT3QKE8j3bwVEA7m9uz/2XJrokr UZCdn1Ig93frpzLLp6g6DZDAQXhPLqR3UINvy2GcKKa51Db6Y2qTN+H4VCy2Rvx+ aBwFziUKhIQqhtUGDCSa0LFmvxNW9aU5nj7+3c1t6jGitINpmuu5O62g9xWDqa47 pqSice1DMswn9R4z5ctFn1I0C9ppbSjYHCjsfUcUpGK1/7KNQSP4VGGGURMdtfNR rRt7CdztGaMQcjG9LLqk82VViIN93JELF5BKh1IPPKKRapkMMDp9/rtXt5a1u0I= =thBv -----END PGP SIGNATURE----- --pxQxOijS06jXgc4b34UMjrLXCkE5cpfI2--