From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42295 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODbPg-0003W3-42 for qemu-devel@nongnu.org; Sun, 16 May 2010 06:49:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODbPe-0008MI-FY for qemu-devel@nongnu.org; Sun, 16 May 2010 06:49:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54272) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODbPe-0008M1-4H for qemu-devel@nongnu.org; Sun, 16 May 2010 06:49:38 -0400 Message-ID: <4BEFCDBE.4090807@redhat.com> Date: Sun, 16 May 2010 13:49:34 +0300 From: Avi Kivity MIME-Version: 1.0 References: <6e14cbfe3764b46d9bd6d2db61d41fd9c85dd54e.1273843151.git.jan.kiszka@siemens.com> <4BED9358.1000106@codemonkey.ws> <4BEE5F0F.2060600@web.de> <4BEE6035.2070906@redhat.com> <4BEE6254.6060701@web.de> <4BEEDA7E.7060805@redhat.com> <4BEFBCE8.1030704@redhat.com> <4BEFBFE9.7010005@redhat.com> <4BEFC5E4.5010208@redhat.com> In-Reply-To: <4BEFC5E4.5010208@redhat.com> 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: Paolo Bonzini Cc: Anthony Liguori , Juan Quintela , qemu-devel@nongnu.org, Markus Armbruster , Luiz Capitulino , Jan Kiszka On 05/16/2010 01:16 PM, Paolo Bonzini wrote: > On 05/16/2010 11:50 AM, Avi Kivity wrote: >> On 05/16/2010 12:37 PM, Paolo Bonzini wrote: >>> On 05/15/2010 07:31 PM, Avi Kivity wrote: >>>> On 05/15/2010 11:59 AM, Jan Kiszka wrote: >>>>> >>>>>> Is this __class__ stuff documented anywhere? >>>>>> >>>>> 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 '__'). >>>>> >>>> >>>> Why use such weird names at all? What's wrong with 'class'? >>> >>> That it conflicts with e.g. PCI classes? >> >> Won't the context tell it apart? > > Yes, of course, it you need to know the schema. If you don't know the > schema you don't know the context. > > This QBuffer thing is something that a client QMP library could create > automatically. Keys in a separate namespace (like '__class__') have > the advantage of being easily picked up automatically by a wrapper of > the JSON parser; if you used simply 'class' such as layer would need > to know a schema, or it wouldn't know that "context". Makes sense. So this is a protocol feature and needs to be documented as such. > (BTW I'd prefer something like '__encoding__'; the word "class" > suggests much more than what it is in reality). Agreed. -- error compiling committee.c: too many arguments to function