Bug 558672 – NULL key lookup using g_hash_table_lookup_extended()
authorChristian Dywan <christian@imendio.com>
Tue, 4 Nov 2008 17:01:19 +0000 (17:01 +0000)
committerChristian Dywan <cdywan@src.gnome.org>
Tue, 4 Nov 2008 17:01:19 +0000 (17:01 +0000)
2008-11-04  Christian Dywan  <christian@imendio.com>

Bug 558672 – NULL key lookup using g_hash_table_lookup_extended()

* glib/ghash.c:
Clarify g_hash_table_lookup_extended

svn path=/trunk/; revision=7644

ChangeLog
glib/ghash.c

index a9246b8..e1c9b63 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-04  Christian Dywan  <christian@imendio.com>
+
+       Bug 558672 – NULL key lookup using g_hash_table_lookup_extended()
+
+       * glib/ghash.c:
+       Clarify g_hash_table_lookup_extended
+
 2008-11-02  Tor Lillqvist  <tml@novell.com>
 
        * configure.in: Expand also build/win32/vs9/Makefile.
index efc2707..ba33266 100644 (file)
@@ -788,16 +788,19 @@ g_hash_table_lookup (GHashTable   *hash_table,
 
 /**
  * g_hash_table_lookup_extended:
- * @hash_table: a #GHashTable.
- * @lookup_key: the key to look up.
- * @orig_key: returns the original key.
- * @value: returns the value associated with the key.
+ * @hash_table: a #GHashTable
+ * @lookup_key: the key to look up
+ * @orig_key: return location for the original key, or %NULL
+ * @value: return location for the value associated with the key, or %NULL
  *
  * Looks up a key in the #GHashTable, returning the original key and the
  * associated value and a #gboolean which is %TRUE if the key was found. This
  * is useful if you need to free the memory allocated for the original key,
  * for example before calling g_hash_table_remove().
  *
+ * You can actually pass %NULL for @lookup_key to test
+ * whether the %NULL key exists.
+ *
  * Return value: %TRUE if the key was found in the #GHashTable.
  **/
 gboolean