[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:24:34 -0300 |
On Thu, 20 Aug 2009 10:51:48 +0300
Avi Kivity <address@hidden> wrote:
> On 08/20/2009 02: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
> >
>
> Why aren't the conversion functions symmetrical?
Are you referring to all of them?
Thinking about this now, qint_from_int() is not needed,
I can drop it and rename qint_from_int64().
Regarding the 'export' ones, I thought that the compiler
would warn about something like:
int index = qint_to_int64(qi);
forcing the user to cast by hand.
But testing it now, it doesn't happen. :)
- [Qemu-devel] [PATCH 01/29] Introduce QObject, (continued)
[Qemu-devel] Re: [PATCH 01/29] Introduce QObject, Paolo Bonzini, 2009/08/20
[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 <=
- [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] [PATCH 03/29] Introduce QString, Luiz Capitulino, 2009/08/19
[Qemu-devel] [PATCH 04/29] Introduce QDict, Luiz Capitulino, 2009/08/19