Merge branch 'th/datalist-update-atomic-no-keyid' into 'main'

[th/datalist-update-atomic-no-keyid] gdataset: drop "key_id" argument from GDataListUpdateAtomicFunc

See merge request GNOME/glib!4508
This commit is contained in:
Philip Withnall 2025-02-21 15:30:25 +00:00
commit 05c7f11306
4 changed files with 7 additions and 10 deletions

View File

@ -1114,7 +1114,7 @@ g_datalist_id_update_atomic (GData **datalist,
new_destroy = NULL; new_destroy = NULL;
} }
result = callback (key_id, &new_data, &new_destroy, user_data); result = callback (&new_data, &new_destroy, user_data);
if (data && !new_data) if (data && !new_data)
{ {

View File

@ -40,9 +40,9 @@ G_BEGIN_DECLS
/*< private > /*< private >
* GDataListUpdateAtomicFunc: * GDataListUpdateAtomicFunc:
* @key_id: ID of the entry to update * @data: (inout) (nullable) (not optional): the existing data corresponding to
* @data: (inout) (nullable) (not optional): the existing data corresponding * the "key_id" parameter of g_datalist_id_update_atomic(), and return location
* to @key_id, and return location for the new value for it * for the new value for it
* @destroy_notify: (inout) (nullable) (not optional): the existing destroy * @destroy_notify: (inout) (nullable) (not optional): the existing destroy
* notify function for @data, and return location for the destroy notify * notify function for @data, and return location for the destroy notify
* function for the new value for it * function for the new value for it
@ -52,8 +52,7 @@ G_BEGIN_DECLS
* *
* Since: 2.80 * Since: 2.80
*/ */
typedef gpointer (*GDataListUpdateAtomicFunc) (GQuark key_id, typedef gpointer (*GDataListUpdateAtomicFunc) (gpointer *data,
gpointer *data,
GDestroyNotify *destroy_notify, GDestroyNotify *destroy_notify,
gpointer user_data); gpointer user_data);

View File

@ -469,8 +469,7 @@ test_datalist_id_remove_multiple_destroy_order (void)
} }
static gpointer static gpointer
_update_atomic_cb (GQuark key_id, _update_atomic_cb (gpointer *data,
gpointer *data,
GDestroyNotify *destroy_notify, GDestroyNotify *destroy_notify,
gpointer user_data) gpointer user_data)
{ {

View File

@ -367,8 +367,7 @@ weak_ref_data_unlock (WeakRefData *wrdata)
} }
static gpointer static gpointer
weak_ref_data_get_or_create_cb (GQuark key_id, weak_ref_data_get_or_create_cb (gpointer *data,
gpointer *data,
GDestroyNotify *destroy_notify, GDestroyNotify *destroy_notify,
gpointer user_data) gpointer user_data)
{ {