mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
use g_datalist_set_flags() and g_datalist_unset_flags() to allow proper
Sun Jul 31 02:04:23 2005 Tim Janik <timj@gtk.org> * gobject.c: use g_datalist_set_flags() and g_datalist_unset_flags() to allow proper locking around &qdata modifications.
This commit is contained in:
parent
a49fda33d5
commit
4746cf2ce0
@ -1,3 +1,8 @@
|
||||
Sun Jul 31 02:04:23 2005 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gobject.c: use g_datalist_set_flags() and g_datalist_unset_flags() to
|
||||
allow proper locking around &qdata modifications.
|
||||
|
||||
Sat Jul 30 21:10:26 2005 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gobject.c: reverted notify_mutex introduction, since this prevents
|
||||
|
@ -1572,7 +1572,7 @@ g_object_add_toggle_ref (GObject *object,
|
||||
|
||||
/* Set a flag for fast lookup after adding the first toggle reference */
|
||||
if (tstack->n_toggle_refs == 1)
|
||||
G_DATALIST_SET_FLAGS (&object->qdata, OBJECT_HAS_TOGGLE_REF_FLAG);
|
||||
g_datalist_set_flags (&object->qdata, OBJECT_HAS_TOGGLE_REF_FLAG);
|
||||
|
||||
tstack->toggle_refs[i].notify = notify;
|
||||
tstack->toggle_refs[i].data = data;
|
||||
@ -1606,7 +1606,7 @@ g_object_remove_toggle_ref (GObject *object,
|
||||
tstack->toggle_refs[i] = tstack->toggle_refs[tstack->n_toggle_refs];
|
||||
|
||||
if (tstack->n_toggle_refs == 0)
|
||||
G_DATALIST_UNSET_FLAGS (&object->qdata, OBJECT_HAS_TOGGLE_REF_FLAG);
|
||||
g_datalist_unset_flags (&object->qdata, OBJECT_HAS_TOGGLE_REF_FLAG);
|
||||
|
||||
g_object_unref (object);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user