Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: PATCH: gint/gpointer casting in GTK+ client
Home

[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]
To: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: PATCH: gint/gpointer casting in GTK+ client
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Oct 2001 21:07:06 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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


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