mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-23 10:42:11 +01:00
gdataset: drop "key_id" argument from GDataListUpdateAtomicFunc
None of the users actually care about this parameter. And it's unlikely that they ever will. Also, the passed "key_id" is the argument from g_datalist_id_update_atomic(). If the caller really cared to know the "key_id" in the callback, they could pass it as additional user data.
This commit is contained in:
parent
b4224a5d6d
commit
6ce489bf83
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user