[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 02/29] Introduce QInt
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] Re: [PATCH 02/29] Introduce QInt |
Date: |
Thu, 20 Aug 2009 10:44:11 -0300 |
On Thu, 20 Aug 2009 10:37:16 +0200
Paolo Bonzini <address@hidden> wrote:
> 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.
We could have them in qemu-common.h or create a qemu-objects.h, but
I would dislike merging everything in only one header file: different
things in different header files is good practice.
With regard to inline you are right, but I avoided it as there's always
a debate on what should be inlined and what shouldn't, I really don't
want to get into this.
> I also noticed this from 01/29 only now:
>
> +#define QType_HEAD \
> + QObject base;
>
> remove the trailing semicolon to ease automatic indentation in editors.
OK
- [Qemu-devel] Re: [PATCH 01/29] Introduce QObject, (continued)
- [Qemu-devel] [PATCH 02/29] Introduce QInt, Luiz Capitulino, 2009/08/19
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Avi Kivity, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Paolo Bonzini, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Luiz Capitulino, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Avi Kivity, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Luiz Capitulino, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Avi Kivity, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Luiz Capitulino, 2009/08/20
[Qemu-devel] Re: [PATCH 02/29] Introduce QInt, Paolo Bonzini, 2009/08/20
- [Qemu-devel] Re: [PATCH 02/29] Introduce QInt,
Luiz Capitulino <=
[Qemu-devel] [PATCH 03/29] Introduce QString, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 04/29] Introduce QDict, Luiz Capitulino, 2009/08/19
[Qemu-devel] Re: [PATCH 04/29] Introduce QDict, Paolo Bonzini, 2009/08/20