Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12893) [PATCH] improved hash tables
Home

[Freeciv-Dev] Re: (PR#12893) [PATCH] improved hash tables

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: vasc@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12893) [PATCH] improved hash tables
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Apr 2005 10:11:01 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12893 >

On Tue, Apr 26, 2005 at 10:01:53AM -0700, Jason Short wrote:
> 
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12893 >
> 
> Benoit Hudson wrote:
> 
> > (2) breaking constness (data and key are const; but to free them we need
> > to remove the const quals) is unfortunate; I'm not sure what the most
> > elegant solution is.  This isn't a new problem: hash_replace and
> > hash_lookup_data return void* rather than const void*.
> 
> Simple: data and key must not be const.

Except that then to put a const city * into the hash the user has to
cast away const.

        -- Benoît





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