From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGyeM-0001K6-CB for qemu-devel@nongnu.org; Fri, 21 Feb 2014 17:32:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGyeH-0007Cr-BL for qemu-devel@nongnu.org; Fri, 21 Feb 2014 17:32:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8184) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGyeG-0007Cg-Qr for qemu-devel@nongnu.org; Fri, 21 Feb 2014 17:32:49 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1LMWmdn023851 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Feb 2014 17:32:48 -0500 Message-ID: <5307D40F.4050104@redhat.com> Date: Fri, 21 Feb 2014 15:32:47 -0700 From: Eric Blake MIME-Version: 1.0 References: <1393006301-22514-1-git-send-email-mreitz@redhat.com> In-Reply-To: <1393006301-22514-1-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NIaaaOQEIVq6Ppr6WiDJlXfECcopQONuo" Subject: Re: [Qemu-devel] [PATCH 0/3] Extract non-QDicts in qdict_array_split() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NIaaaOQEIVq6Ppr6WiDJlXfECcopQONuo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02/21/2014 11:11 AM, Max Reitz wrote: > Currently, qdict_array_split() splits a QDict like > { "0.a": 42, "1": 23, "2.b": 84 } > into the QList > [ { "a": 42 } ] > with the QDict still being > { "1": 23, "2.b": 84 } >=20 > However, it makes more sense to create the QList > [ { "a": 42 }, 23, { "b": 84 } ] > and having emptied the QDict. >=20 > This is implemented by this series. >=20 Question - in the code, we have a comment: /** * qdict_flatten(): For each nested QDict with key x, all fields with key= y * are moved to this QDict and their key is renamed to "x.y". For each nested * QList with key x, the field at index y is moved to this QDict with the key * "x.y" (i.e., the reverse of what qdict_array_split() does). * This operation is applied recursively for nested QDicts and QLists. */ With your new split rules, do we need a followup patch to qdict_flatten that can regenerate the QDict with "%u" keys for non-dict members of the QList? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --NIaaaOQEIVq6Ppr6WiDJlXfECcopQONuo 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTB9QPAAoJEKeha0olJ0NqoykIAI44uWtUC4/PCpX7J5rs53Hn JcNoi2cMNNqFcjRjoRd9Vxl12cvArss+M8vctLcJQt3f6GbBP5H8AGRk4I68K0cl DFifHn5eUThsLcpWaCsc3V31xyIZVs6w8aKa8R3XT2YnU/xMuNT7ZrsSY0WsWvjZ aY39+5drW8aIywvDh6r7vfnDtKR5FNI3Jn5ePVsLYoBZZPOGVln5Si121MKzKnYo QqCIctirC+xKYd2Lhw6+wG7Qb6qUeJx7CHW7umsKasCtcV9XecUjK2kjH8UYdmoH kLQJfNNIs9NS2zATq8nmW6lrz9k5xLM3nUC3x+FT2HLVu4WNpI/CuBOyb9YYL10= =vjr3 -----END PGP SIGNATURE----- --NIaaaOQEIVq6Ppr6WiDJlXfECcopQONuo--