mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-27 17:52:58 +02:00
Use hash tables as sets in various places
Where we were already treating GHashTables as sets, modify them to use the set-specific APIs g_hash_table_add() and g_hash_table_contains(), to make that usage more obvious and less prone to being broken. Heavily based on patches by Garrett Regier <garrettregier@gmail.com>. Signed-off-by: Philip Withnall <withnall@endlessm.com> https://bugzilla.gnome.org/show_bug.cgi?id=749371
This commit is contained in:
@@ -948,7 +948,7 @@ g_param_spec_pool_insert (GParamSpecPool *pool,
|
||||
g_mutex_lock (&pool->mutex);
|
||||
pspec->owner_type = owner_type;
|
||||
g_param_spec_ref (pspec);
|
||||
g_hash_table_insert (pool->hash_table, pspec, pspec);
|
||||
g_hash_table_add (pool->hash_table, pspec);
|
||||
g_mutex_unlock (&pool->mutex);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user