[Freeciv-Dev] Re: (PR#12893) [PATCH] improved hash tables
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12893 >
Raimar Falke wrote:
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=12893 >
>
> On Mon, Apr 25, 2005 at 05:47:10PM -0700, Vasco Alexandre da Silva Costa
> wrote:
>
>><URL: http://bugs.freeciv.org/Ticket/Display.html?id=12893 >
>>
>>This patch adds extra functionality to hash tables. This allows to
>>better keep track of freed memory, and adds a new lookup function.
>>
>>It is 100% backwards compatible with the existing API, so it means it
>>has zero impact on existing code on CVS HEAD.
>>
>>I would like to commit this ASAP, since besides being useful by itself,
>>it is required for PR#12706: Events framework.
>
> It looks like we are implementing some kind of garbage collection?!
No, it's just a callback mechanism to be called when a hash is freed.
However Vasco you really must write some documentaion, i.e., comments.
These functions are not nearly as obvious as you seem to think they are.
Also there's an unnecessary (void *) cast that is a bit ugly.
-jason
|
|