From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49565 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODDDF-0006OB-LK for qemu-devel@nongnu.org; Sat, 15 May 2010 04:59:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODDD5-0001kW-AB for qemu-devel@nongnu.org; Sat, 15 May 2010 04:59:13 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:52142) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODDD4-0001k2-CY for qemu-devel@nongnu.org; Sat, 15 May 2010 04:59:03 -0400 Message-ID: <4BEE6254.6060701@web.de> Date: Sat, 15 May 2010 10:59:00 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <6e14cbfe3764b46d9bd6d2db61d41fd9c85dd54e.1273843151.git.jan.kiszka@siemens.com> <4BED9358.1000106@codemonkey.ws> <4BEE5F0F.2060600@web.de> <4BEE6035.2070906@redhat.com> In-Reply-To: <4BEE6035.2070906@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB4DC8268139E55FD6962A180" Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH 3/8] Add QBuffer List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Anthony Liguori , Juan Quintela , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB4DC8268139E55FD6962A180 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > On 05/15/2010 11:45 AM, Jan Kiszka wrote: >> >>> Instead of encoding just as a string, it would be a good idea to enco= de >>> it as something like: >>> >>> {'__class__': 'base64', 'data': ...} >>> >>> We've discussed using hidden properties to describe special things li= ke >>> abstract classes and since we already have this namespace reserved, I= >>> think it's a good time to use it. >>> >>> The advantage is that in a dynamic language like Python, the parser c= an >>> convert base64 to binary strings automatically without having to >>> understand the QMP protocol. >>> =20 >> Indeed, was amazingly simple to add and works nicely with qmp-shell as= >> demonstrator. Will repost, also to fix a few remaining glitches I came= >> across in the meantime. >> >> =20 >=20 > Is this __class__ stuff documented anywhere? >=20 Not yet. Also, we should clarify the proposed private extension section that only "__some_key" is reserved for downstream, not '__some_other_key__' (i.e. downstream names must not end with '__'). Jan --------------enigB4DC8268139E55FD6962A180 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.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkvuYlQACgkQitSsb3rl5xS7xQCfRHkYDun7k4QHY8qkuPeNWqlq fKgAn1FRMrb8SOiD7SVgP4Fa3eVlcnYa =ANk8 -----END PGP SIGNATURE----- --------------enigB4DC8268139E55FD6962A180--