From: Tim Janik Date: Sun, 31 Jul 2005 00:05:22 +0000 (+0000) Subject: use g_datalist_set_flags() and g_datalist_unset_flags() to allow proper X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=4746cf2ce03caf665f357d5741c6b4b9c3c6cd1b;p=dana%2Fcg-glib.git use g_datalist_set_flags() and g_datalist_unset_flags() to allow proper Sun Jul 31 02:04:23 2005 Tim Janik * gobject.c: use g_datalist_set_flags() and g_datalist_unset_flags() to allow proper locking around &qdata modifications. --- diff --git a/gobject/ChangeLog b/gobject/ChangeLog index f1d048f9..cfdb1bae 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,8 @@ +Sun Jul 31 02:04:23 2005 Tim Janik + + * 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 * gobject.c: reverted notify_mutex introduction, since this prevents diff --git a/gobject/gobject.c b/gobject/gobject.c index 4b79caf3..e3f3e2dd 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -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);