From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MabkI-00026R-EN for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:45:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MabkD-00025m-LR for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:45:29 -0400 Received: from [199.232.76.173] (port=49805 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MabkD-00025j-Gm for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:45:25 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:53840) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MabkD-000284-2J for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:45:25 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e1.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n7AKdlfB017895 for ; Mon, 10 Aug 2009 16:39:47 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7AKjKgb233452 for ; Mon, 10 Aug 2009 16:45:20 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7AKjK3m004925 for ; Mon, 10 Aug 2009 16:45:20 -0400 Message-ID: <4A8086DD.6090206@us.ibm.com> Date: Mon, 10 Aug 2009 15:45:17 -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> <4A80803F.4010303@codemonkey.ws> <20090810174213.616e6c09@doriath> In-Reply-To: <20090810174213.616e6c09@doriath> 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, qemu-devel@nongnu.org, avi@redhat.com Luiz Capitulino wrote: >> 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"); >> > > It will be provided by the QObject patches I'm already > working on, why can't we wait for it? > Lack of type safety is a rather fundamental flaw. It's hard to judge whether qdict is correct because it's fundamentally flawed in it's current form. Maybe you should take the opposite approach? Introduce QObject along with a type-safe qdict and then do the monitor command conversion. I feel like merging qdict as is would be a regression because it makes the monitor commands even less type safe then they were before. -- Regards, Anthony Liguori