From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MBZJL-0004xM-O1 for qemu-devel@nongnu.org; Tue, 02 Jun 2009 15:06:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MBZJG-0004rm-VE for qemu-devel@nongnu.org; Tue, 02 Jun 2009 15:06:11 -0400 Received: from [199.232.76.173] (port=40433 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MBZJG-0004rT-Ma for qemu-devel@nongnu.org; Tue, 02 Jun 2009 15:06:06 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51381) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MBZJF-0006qw-As for qemu-devel@nongnu.org; Tue, 02 Jun 2009 15:06:05 -0400 Message-ID: <4A25777F.4030605@redhat.com> Date: Tue, 02 Jun 2009 22:03:27 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] use qemu_malloc and friends consistently References: <200905290758.11551.jcd@tribudubois.net> <4A1FD6E2.9020006@redhat.com> <200905291407.26757.paul@codesourcery.com> <200905291917.10535.jseward@acm.org> <60cad3f0905291412m670c7a6cw45f9b51f3122ddfb@mail.gmail.com> <4A24D40E.2060704@redhat.com> <60cad3f0906021102o635b05f7m91593060683bb338@mail.gmail.com> In-Reply-To: <60cad3f0906021102o635b05f7m91593060683bb338@mail.gmail.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: David Turner Cc: Kevin Wolf , qemu-devel@nongnu.org, Jean-Christophe Dubois , Gerd Hoffmann , Paul Brook David Turner wrote: > > The first version will extract the item size automatically for you, > making it less likely that you screw things in the second version's > parameter list. > But I'm not going to fight against it. > > Also, my code is usually a lot more aggressive than what I proposed. I > don't want to burn too many cycles on this, just stating that, > generally speaking, it is possible to use macros/wrappers to both make > the code's intent more clear and reduce potential errors. There's no need to reinvent a programming language in macros. If we feel that type safety is a good thing, we should switch to a language that supports it. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.