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 20:46:26 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Mon, Oct 08, 2001 at 07:11:48PM +0100, Ben Webb wrote:
>       There are a lot of places in the GTK+ client where integer values
> are cast to and from pointer values. This causes no problems on (for
> example) an i386 Linux box, since sizeof(gint)=sizeof(gpointer). However,
> this is not the case on my Alpha box. The GLib guys have already allowed
> for this, however, and have provided GINT_TO_POINTER and GPOINTER_TO_INT
> macros for supposedly "safe" casts. The attached patch replaces the
> existing casts with the GLib macros, removing a LOT of redundant warnings
> when compiling on an Alpha.
> 
>       The patch touches little code, so I don't see any reasonable
> reason why it shouldn't be committed. Complaints?

No problems from me.

        Raimar

P.S.: How is GINT_TO_POINTER and GPOINTER_TO_INT defined on a alpha?

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv



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