[Freeciv-Dev] Re: PATCH: gint/gpointer casting in GTK+ client
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Oct 08, 2001 at 07:59:43PM +0100, Ben Webb wrote:
> On Mon, 8 Oct 2001, Raimar Falke wrote:
>
> > P.S.: How is GINT_TO_POINTER and GPOINTER_TO_INT defined on a alpha?
>
> On an Intel:-
> #define GPOINTER_TO_INT(p) ((gint) (p))
> #define GINT_TO_POINTER(i) ((gpointer) (i))
>
> On an Alpha:-
> #define GPOINTER_TO_INT(p) ((gint) (glong) (p))
> #define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
>
> So... it's still not exactly "pretty", but it does at least make
> the code a little more portable, and more robust should the GLib/GTK+ guys
> change their underlying types.
Note that in some places int is used instead of gint. I know this
because I changed this for the cid stuff. It may turn out that this
cause problems.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Python is executable pseudocode. Perl is executable line noise"
-- Bruce Eckel
|
|