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:
Tim Janik 2005-07-31 00:05:22 +00:00 committed by Tim Janik
parent a49fda33d5
commit 4746cf2ce0
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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);