From 99bedd110cfdbce72387f203cc6dc2182317b879 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 14 Oct 2022 08:03:43 +0000 Subject: [PATCH] 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 808ec628a..0e6ba4882 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 */