From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MabIw-0003c9-D9 for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:17:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MabIr-0003YK-Gv for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:17:13 -0400 Received: from [199.232.76.173] (port=54123 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MabIr-0003Y8-AY for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:17:09 -0400 Received: from mail-qy0-f174.google.com ([209.85.221.174]:64199) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MabIq-0004Sa-Bc for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:17:08 -0400 Received: by qyk4 with SMTP id 4so2722939qyk.4 for ; Mon, 10 Aug 2009 13:17:08 -0700 (PDT) Message-ID: <4A80803F.4010303@codemonkey.ws> Date: Mon, 10 Aug 2009 15:17:03 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1 References: <1249318642-19324-1-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1249318642-19324-1-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: jan.kiszka@siemens.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com Luiz Capitulino wrote: > Hi there, > > In the long QEMU Monitor Protocol (QMP) thread people have agreed that, > whichever protocol we are going to use, the first step that needs to be > done is to improve current Monitor's code, so that command handlers > support 'structured' input and output. > I think one of the goals was for there to be type safety. qdicts store void *s which is pretty clumsy. I think you may be waiting to introduce QObject, but in the interim, you should at least introduce a boxed type and have proper accessors in qdict. For instance, instead of: int f = (long)qdict_get(foo, "bar"); It should be: int f = qdict_get_int(foo, "bar"); Regards, Anthony Liguori