From 5dd619b9482a443225559383934d2b9a55943e86 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Mon, 31 Jul 2023 19:27:50 +0200 Subject: [PATCH] glib-2.0: Update return-type of HashTable.add/insert/replace() and GenericSet.add() These return bool since 2.40 Fixes https://gitlab.gnome.org/GNOME/vala/issues/1465 --- vapi/glib-2.0.vapi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index ea4d7f2d3..55f1a7b2c 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -5541,10 +5541,10 @@ namespace GLib { public HashTable.full (HashFunc? hash_func, EqualFunc? key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func); [Version (since = "2.72")] public HashTable.similar (HashTable other_hash_table); - public void insert (owned K key, owned V value); - public void replace (owned K key, owned V value); + public bool insert (owned K key, owned V value); + public bool replace (owned K key, owned V value); [Version (since = "2.32", deprecated_since = "vala-0.26", replacement = "GenericSet.add")] - public void add (owned K key); + public bool add (owned K key); public unowned V? lookup (K key); public bool lookup_extended (K lookup_key, out unowned K orig_key, out unowned V value); [Version (since = "2.32")] @@ -5557,7 +5557,7 @@ namespace GLib { [CCode (cname = "g_hash_table_lookup")] public unowned V? @get (K key); [CCode (cname = "g_hash_table_insert")] - public void @set (owned K key, owned V value); + public bool @set (owned K key, owned V value); [Version (since = "2.14")] public List get_keys (); #if VALA_0_26 @@ -5615,7 +5615,7 @@ namespace GLib { public class GenericSet { [CCode (cname = "g_hash_table_new_full", simple_generics = true)] public GenericSet (HashFunc? hash_func, EqualFunc? equal_func, GLib.DestroyNotify? always_pass_null_here = null); - public void add (owned T value); + public bool add (owned T value); public bool contains (T valule); public bool remove (T value); public void remove_all (); -- 2.47.2