Re: glib hash memory footprint



On Sun, 2004-08-29 at 19:46, Davi de Castro Reis wrote:

> One more thing I would like to have in the API would be the ability to 
> arbitrarily change the equality function for hash table (between calls 
> to g_hash_table_lookup). There are some dirty tricks that can be done 
> with this, like looking in the hash table with or without 
> case-sensitivity, without the need of keeping two different hash tables. 
>   Do you think that a g_hash_table_set_equal_func() function could be 
> part of the API?

perhaps something like g_hash_table_lookup_with_equal would be more
appropriate than changing the hash function out from under things. it
could look for a match with the supplied equal function rather than the
hash table's. i don't like the idea of the hash's equal function
changing after initial creation, that just sounds like problems waiting
to happen.

-- 
-rm
http://www.neces.com/




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]