removing element from GHashTable returns FALSE
- From: Luka Napotnik <luka napotnik gmail com>
- To: gtk-app-devel-list gnome org
- Subject: removing element from GHashTable returns FALSE
- Date: Mon, 10 Nov 2008 17:17:40 +0100
Hello.
I'm using a GHashTable to store some structures. The keys are unsigned
integers. I create my hash table with:
g_hash_table_new(g_direct_hash, NULL);
Then I store same values with keys with:
g_hash_table_insert(my_hash_table, GUINT_TO_POINTER(3), mystruct);
But when I try to remove the value from the hash table I get FALSE from
g_hash_table_remove():
g_hash_table_remove(my_hash_table, GUINT_TO_POINTER(3));
The funny part is that I lookup for that same key just a few lines
before and it is found.
Any ideas what could be wrong?
Greets,
Luka
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]