Re: GHashTable



On Mon, Jun 07, 2004 at 01:44:14AM +1000, Russell Shaw wrote:
I get a segfault with:

  GHashTable *hash=g_hash_table_new(g_int_hash,g_int_equal);
  g_hash_table_insert(hash,1,"Hi");

That's correct, 1 is hardly a valid pointer (to int or
anything else).  You probably want g_direct_hash.

Yeti


--
Do not use tab characters. Their effect is not predictable.



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