Re: glib hash tables

2006-03-14 Thread Adrian Vasile
Many thanks, the problem was destroying c & d. All I need now is to have a dynamic list (insert, update, delete) keeping the client struct. I thought hash tables would be nice cause they provide fast lookups. This implies keeping in memory, besides the GHashTable, also an array of client. Is there

Re: glib hash tables

2006-03-14 Thread David Necas (Yeti)
On Tue, Mar 14, 2006 at 11:48:56AM +0200, Adrian Vasile wrote: > I'm having trouble understanding the GHashTable and it's member > functions. GHashTable just stores some untyped pointers. Since it has no idea what type the stored data are, it cannot make a copies of them and does not make copies

glib hash tables

2006-03-14 Thread Adrian Vasile
Hi all, I'm having trouble understanding the GHashTable and it's member functions. I've made the following simple code for testing purposes: #include #include typedef struct _client { guint id; guint win; gchar *name; gchar