Re: 64-bit analysis of the gtk+ library
- From: Miroslaw Dobrzanski-Neumann <mne mosaic-ag com>
- To: gtk-devel-list gnome org
- Subject: Re: 64-bit analysis of the gtk+ library
- Date: Tue, 9 Jul 2002 09:51:54 +0200
> 3. Warnings due to the macro definitions of GPOINTER_TO_UINT and
> GPOINTER_TO_INT.
> The GPOINTER_TO_UINT and the GPOINTER_TO_INT macros provide a portable
> method of storing gint and guint values in gpointer variables. The warning
> arises because of the definition of the macros.
> #define GPOINTER_TO_INT(p) ((gint) (glong) (p))
> #define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
> The cast from (gulong) to (guint) and (glong) (gint) results in the
> warning. Not a problem though.
The C99 standard has introduced the following datatypes:
intptr_t and uintptr_t
these are integral types capable to store integer or pointer.
All newer and many pre C99 compilers (as sunproc or xlc) support this datatype.
the Microsoft compiler cl.exe 12.00 (Visual Studio 6) has an INT_PTR and
UINT_PTR types instead.
cl.exe 13.00 supports both intptr_t and uintptr_t.
Why not use these types in places where GPOINTER_TO_INT is heavily used?
--
Miroslaw Dobrzanski-Neumann
MOSAIC SOFTWARE AG
Abteilung Basisentwicklung und Forschung
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne mosaic-ag com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]