From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33733) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrYyk-000673-Il for qemu-devel@nongnu.org; Fri, 13 Dec 2013 15:04:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VrYyf-0002jI-Md for qemu-devel@nongnu.org; Fri, 13 Dec 2013 15:04:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52090) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VrYyf-0002j9-D8 for qemu-devel@nongnu.org; Fri, 13 Dec 2013 15:04:49 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBDK4mUT003521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 13 Dec 2013 15:04:48 -0500 Message-ID: <52AB685F.1060402@redhat.com> Date: Fri, 13 Dec 2013 13:04:47 -0700 From: Eric Blake MIME-Version: 1.0 References: <1386954633-28905-1-git-send-email-mreitz@redhat.com> <1386954633-28905-5-git-send-email-mreitz@redhat.com> In-Reply-To: <1386954633-28905-5-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pkVxhLEirH9KAOjnPQg4Ov0CIlIxt4VkF" Subject: Re: [Qemu-devel] [PATCH v5 04/22] qapi: extend qdict_flatten() for QLists List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pkVxhLEirH9KAOjnPQg4Ov0CIlIxt4VkF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/13/2013 10:10 AM, Max Reitz wrote: > Reversing qdict_array_split(), qdict_flatten() should flatten QLists as= > well by interpreting them as QDicts where every entry's key is its > index. >=20 > This allows bringing QDicts with QLists from QMP commands to the same > form as they would be given as command-line options, thereby allowing > them to be parsed the same way. >=20 > Signed-off-by: Max Reitz > --- > qobject/qdict.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++= ++------ > + /* This function is never called with prefix =3D=3D NULL, i.e., it= is always > + * called from within qdict_flatten_q(list|dict)(). Therefore, it = does not > + * need to remove list entries during the iteration (the whole lis= t will be > + * deleted eventually anyway from qdict_flatten_qdict()). Also, pr= efix can > + * never be NULL. */ The comment sounds redundant: "never called with prefix =3D=3D NULL ... prefix can never be NULL". --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pkVxhLEirH9KAOjnPQg4Ov0CIlIxt4VkF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSq2hfAAoJEKeha0olJ0NqhtsH/jn4aCGUV71rL4DbURExj0k/ wI5Xksr3M6d62FnLzKDiqRdApRnctxcpHG/KA0JNsWtizdEdZPKBzGcVUPXY81J8 1HXGwp0byijT/sIAHG93RcmdMXcdS9u+IW3le/rLeVUS09xH/2Lz9FyK2c814V1Z xkHwWIvYLtI0CQykYE2//AWjAFx4aQ8SJpOoceqGbqtojC0Qvr7BDbBE5z2BYkMb D+M72xRJ3UBrc5HRu35BEUnxMcI+4mLjhQyoSoW5HY/VyVOZdjNTruJQSV/yJd0Y 3/OVxRTgH7EYPTVPrLMap9Y28TvyqBYn33VQIohfJX8/4qXnf15rRnScQeeSZ3g= =CkjS -----END PGP SIGNATURE----- --pkVxhLEirH9KAOjnPQg4Ov0CIlIxt4VkF--