use g_datalist_set_flags() and g_datalist_unset_flags() to allow proper
authorTim Janik <timj@gtk.org>
Sun, 31 Jul 2005 00:05:22 +0000 (00:05 +0000)
committerTim Janik <timj@src.gnome.org>
Sun, 31 Jul 2005 00:05:22 +0000 (00:05 +0000)
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.

gobject/ChangeLog
gobject/gobject.c

index f1d048f..cfdb1ba 100644 (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
index 4b79caf..e3f3e2d 100644 (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);