Re: [PATCH] generic lookup dictionary (hash) - extends gwlib/dict.[ch]

2007-02-01 Thread Stipe Tolj
Alexander Malysh wrote: Hi, I don't know now how to use this code but code reviews show: usage example is in test/test_gw_dict.c, which is attached in the patch. 1) gw_dict_ops_t doesn't define function to destroy key. Because key is not Octstr anymore you need to know which function to

[PATCH] generic lookup dictionary (hash) - extends gwlib/dict.[ch]

2007-01-31 Thread Stipe Tolj
Hi list, attached is an enhanced version of our gwlib/dict.[ch], now called gwlib/gw-dict.[ch] that can used generic key types. Generic means void* key actually, and now Octstr* key as current Dict does. Why? Because under certain conditions it's too expensive to do all the string mangling

Re: [PATCH] generic lookup dictionary (hash) - extends gwlib/dict.[ch]

2007-01-31 Thread Stipe Tolj
Stipe Tolj wrote: Hi list, attached is an enhanced version of our gwlib/dict.[ch], now called gwlib/gw-dict.[ch] that can used generic key types. Generic means void* key actually, and now Octstr* key as current Dict does. Why? Because under certain conditions it's too expensive to do all

Re: [PATCH] generic lookup dictionary (hash) - extends gwlib/dict.[ch]

2007-01-31 Thread Alexander Malysh
Hi, I don't know now how to use this code but code reviews show: 1) gw_dict_ops_t doesn't define function to destroy key. Because key is not Octstr anymore you need to know which function to call. 2) because of (1) you don't destroy keys = memleak 3) +List *gw_dict_keys(gw_dict_t *dict) +{