[glib] docs: Mention the newly added return values



commit 77419cf5781646c0b4280ba084240a3c5482e1d3
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Feb 8 14:27:02 2018 +0000

    docs: Mention the newly added return values
    
    The return value of the g_hash_table_add(), g_hash_table_insert(), and
    g_hash_table_replace() functions was changed from void to gboolean in
    GLib 2.40, but it was not mentioned in the API reference or the release
    notes.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=793300

 glib/ghash.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/glib/ghash.c b/glib/ghash.c
index 1ddd4e9e4..6bb04a50d 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -1250,6 +1250,10 @@ g_hash_table_insert_internal (GHashTable *hash_table,
  * @key_destroy_func when creating the #GHashTable, the passed
  * key is freed using that function.
  *
+ * Starting from GLib 2.40, this function returns a boolean value to
+ * indicate whether the newly added value was already in the hash table
+ * or not.
+ *
  * Returns: %TRUE if the key did not exist yet
  */
 gboolean
@@ -1274,6 +1278,10 @@ g_hash_table_insert (GHashTable *hash_table,
  * If you supplied a @key_destroy_func when creating the
  * #GHashTable, the old key is freed using that function.
  *
+ * Starting from GLib 2.40, this function returns a boolean value to
+ * indicate whether the newly added value was already in the hash table
+ * or not.
+ *
  * Returns: %TRUE if the key did not exist yet
  */
 gboolean
@@ -1297,6 +1305,10 @@ g_hash_table_replace (GHashTable *hash_table,
  * corresponding value it is able to be stored more efficiently.  See
  * the discussion in the section description.
  *
+ * Starting from GLib 2.40, this function returns a boolean value to
+ * indicate whether the newly added value was already in the hash table
+ * or not.
+ *
  * Returns: %TRUE if the key did not exist yet
  *
  * Since: 2.32


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