[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 02/29] Introduce QInt

From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH 02/29] Introduce QInt
Date: Thu, 20 Aug 2009 10:37:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

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<address@hidden>
  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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]