From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56756 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODD4i-0002mg-Jd for qemu-devel@nongnu.org; Sat, 15 May 2010 04:50:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODD4U-0000FM-4R for qemu-devel@nongnu.org; Sat, 15 May 2010 04:50:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18738) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODD4T-0000F7-SA for qemu-devel@nongnu.org; Sat, 15 May 2010 04:50:10 -0400 Message-ID: <4BEE6035.2070906@redhat.com> Date: Sat, 15 May 2010 11:49:57 +0300 From: Avi Kivity MIME-Version: 1.0 References: <6e14cbfe3764b46d9bd6d2db61d41fd9c85dd54e.1273843151.git.jan.kiszka@siemens.com> <4BED9358.1000106@codemonkey.ws> <4BEE5F0F.2060600@web.de> In-Reply-To: <4BEE5F0F.2060600@web.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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: Jan Kiszka Cc: Anthony Liguori , Juan Quintela , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino On 05/15/2010 11:45 AM, Jan Kiszka wrote: > >> Instead of encoding just as a string, it would be a good idea to encode >> it as something like: >> >> {'__class__': 'base64', 'data': ...} >> >> We've discussed using hidden properties to describe special things like >> 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 can >> convert base64 to binary strings automatically without having to >> understand the QMP protocol. >> > 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. > > Is this __class__ stuff documented anywhere? -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.