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 20:14:58 +0100 (BST)

On Mon, 8 Oct 2001, Raimar Falke wrote:

> Note that in some places int is used instead of gint.

This is true.

> I know this because I changed this for the cid stuff. It may turn out
> that this cause problems.

        Possibly... in future. However, on all platforms that I have
access to, "gint" is typedef'd to be identical to "int". If they ever
change this, we should hopefully be alerted by compiler warnings when it
tries to convert "gint" (from GPOINTER_TO_INT) to "int". I still feel this
is better than the current situation, where the presence of an explicit
cast (rather than the machine-dependent macro) could hide such a
(potential) warning.

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"Lately I'm in to circuitry"



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