glib r7644 - in trunk: . glib



Author: cdywan
Date: Tue Nov  4 17:01:19 2008
New Revision: 7644
URL: http://svn.gnome.org/viewvc/glib?rev=7644&view=rev

Log:
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

Modified:
   trunk/ChangeLog
   trunk/glib/ghash.c

Modified: trunk/glib/ghash.c
==============================================================================
--- trunk/glib/ghash.c	(original)
+++ trunk/glib/ghash.c	Tue Nov  4 17:01:19 2008
@@ -788,16 +788,19 @@
 
 /**
  * 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



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