[glib: 1/2] ghash: document g_hash_table_steal_extended() behavior for sets




commit 99bedd110cfdbce72387f203cc6dc2182317b879
Author: Thomas Haller <thaller redhat com>
Date:   Fri Oct 14 08:03:43 2022 +0000

    ghash: document g_hash_table_steal_extended() behavior for sets

 glib/ghash.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/glib/ghash.c b/glib/ghash.c
index 808ec628aa..0e6ba4882c 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -1839,6 +1839,10 @@ g_hash_table_steal (GHashTable    *hash_table,
  * You can pass %NULL for @lookup_key, provided the hash and equal functions
  * of @hash_table are %NULL-safe.
  *
+ * The dictionary implementation optimizes for having all values identical to
+ * their keys, for example by using g_hash_table_add(). When stealing both the
+ * key and the value from such a dictionary, the value will be %NULL.
+ *
  * Returns: %TRUE if the key was found in the #GHashTable
  * Since: 2.58
  */


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