From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Maby6-0004NH-8N for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:59:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Maby1-00049I-66 for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:59:45 -0400 Received: from [199.232.76.173] (port=45819 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Maby0-00048q-Vw for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:59:41 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51744) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Maby0-0004TM-AN for qemu-devel@nongnu.org; Mon, 10 Aug 2009 16:59:40 -0400 Date: Mon, 10 Aug 2009 17:59:29 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH v1 00/25] Monitor handlers new structure phase 1 Message-ID: <20090810175929.43d1fe85@doriath> In-Reply-To: <4A8086DD.6090206@us.ibm.com> References: <1249318642-19324-1-git-send-email-lcapitulino@redhat.com> <4A80803F.4010303@codemonkey.ws> <20090810174213.616e6c09@doriath> <4A8086DD.6090206@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org, avi@redhat.com On Mon, 10 Aug 2009 15:45:17 -0500 Anthony Liguori wrote: > 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. It's as simple as the current code. > Maybe you should take the opposite approach? Introduce QObject along > with a type-safe qdict and then do the monitor command conversion. This is an option, although will make the series larger and harder to review. > 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. I have the impression it's the same thing, but at this point it wouldn't be too difficult for me to move QObject patches to the beginning of the series.