From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Me39C-0008UH-1t for qemu-devel@nongnu.org; Thu, 20 Aug 2009 04:37:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Me397-0008SQ-I9 for qemu-devel@nongnu.org; Thu, 20 Aug 2009 04:37:25 -0400 Received: from [199.232.76.173] (port=36273 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Me397-0008SL-6y for qemu-devel@nongnu.org; Thu, 20 Aug 2009 04:37:21 -0400 Received: from mail-ew0-f223.google.com ([209.85.219.223]:53199) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Me396-0001XX-WA for qemu-devel@nongnu.org; Thu, 20 Aug 2009 04:37:21 -0400 Received: by ewy23 with SMTP id 23so5220374ewy.8 for ; Thu, 20 Aug 2009 01:37:20 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4A8D0B3C.5040404@gnu.org> Date: Thu, 20 Aug 2009 10:37:16 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1250723280-3509-1-git-send-email-lcapitulino@redhat.com> <1250723280-3509-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1250723280-3509-3-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 02/29] Introduce QInt List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, avi@redhat.com On 08/20/2009 01:07 AM, Luiz Capitulino wrote: > QInt is a high-level data type that can be used to store integers > and perform type-safe conversions. > > The following functions are available: > > - qint_from_int() Create a new QInt from an int > - qint_from_int64() Create a new QInt from an int64_t > - qint_to_int() Export QInt to int > - qint_to_uint64() Export QInt to uint64_t > - qint_to_uint32() Export QInt to uint32_t > > Signed-off-by: Luiz Capitulino > --- > Makefile | 1 + > qint.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > qint.h | 20 +++++++++++++ I don't see the need for a separate header file since 99.99% of the QObject clients would include all the .h files; also, most function could be inline in qint.h (or qobject.h) given that struct QInt is not opaque. I also noticed this from 01/29 only now: +#define QType_HEAD \ + QObject base; remove the trailing semicolon to ease automatic indentation in editors. Paolo