From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MWXCF-0003nT-Si for qemu-devel@nongnu.org; Thu, 30 Jul 2009 11:05:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MWXCB-0003jV-7I for qemu-devel@nongnu.org; Thu, 30 Jul 2009 11:05:31 -0400 Received: from [199.232.76.173] (port=48873 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MWXCA-0003j7-TY for qemu-devel@nongnu.org; Thu, 30 Jul 2009 11:05:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59015) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MWXC9-0002QX-Sm for qemu-devel@nongnu.org; Thu, 30 Jul 2009 11:05:26 -0400 Date: Thu, 30 Jul 2009 12:05:01 -0300 From: Luiz Capitulino Message-ID: <20090730120501.1642968b@doriath> In-Reply-To: <4A71B65B.1010700@redhat.com> References: <1248818713-11261-1-git-send-email-lcapitulino@redhat.com> <1248818713-11261-2-git-send-email-lcapitulino@redhat.com> <4A701AA3.4060902@redhat.com> <20090729104600.17deb355@doriath> <4A705536.3020305@redhat.com> <20090729112220.16ffe414@doriath> <4A705EAB.1030200@redhat.com> <20090729131131.2d5e4fa6@doriath> <4A70769A.7000404@redhat.com> <20090730115051.53495100@doriath> <4A71B65B.1010700@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 01/25] Introduce QEMU dictionary data type List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: aliguori@us.ibm.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, filip.navara@gmail.com On Thu, 30 Jul 2009 18:03:55 +0300 Avi Kivity wrote: > On 07/30/2009 05:50 PM, Luiz Capitulino wrote: > > > A last comment. My patches introduce explicit casting, as in: > > > > int index = (long) qemu_dict_get(qdict, "index"); > > > > Although the current code doesn't do that, it passes the > > 'arg[]' contents to handlers, I *guess* the compiler will > > do the same kind of casting will apply. > > s/will apply// :) > So the existing code splits 64-bit types into two 32-bit values. As > long as you do the same (for now), we should be safe. Yes, I already do the same. I have changed some 'int's to 'long's for no reason though, will fix that (but should not be a problem, anyway). > Later of course we can replace it with a QNumber or QInteger. Exactly.