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;
}
result = callback (key_id, &new_data, &new_destroy, user_data);
result = callback (&new_data, &new_destroy, user_data);
if (data && !new_data)
{

View File

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

View File

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

View File

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