Re: GHashTable Question



Havoc Pennington <hp redhat com> wrote:


jseymour LinxNet com (Jim Seymour) writes: 
Are the Ximian docs correct and the API docs wrong?


Apprently. g_hash_table_insert() uses the old key if any.
g_hash_table_replace() always replaces the old key.

Thanks for the follow-up.

I'm not sure what you're telling me, tho.  Is the example code snippit
I included in my original posting correct?  Will it do what the API
docs say it will do?  IOW: not create duplicate keys?  Not "leak
memory?"  Etc.


Thanks,
Jim
-- 
Jim Seymour                  | PGP Public Key available at:
jseymour LinxNet com         | http://www.uk.pgp.net/pgpnet/pks-commands.html
http://jimsun.LinxNet.com    |



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