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: <rf13@xxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: PATCH: gint/gpointer casting in GTK+ client
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Oct 2001 19:59:43 +0100 (BST)

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.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"He [Professor Moriarty] is the Napoleon of crime."
        - 'The Final Problem', Sir Arthur Conan Doyle



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