diff options
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/ChangeLog | 5 | ||||
-rw-r--r-- | gobject/gobject.c | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 4084b5f5d..4054096a3 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,8 @@ +2009-02-17 Matthias Clasen <mclasen@redhat.com> + + * gobject.c: Remove (now) unnecessary cases from g_atomic_int_get + calls. + 2009-02-16 Matthias Clasen <mclasen@redhat.com> * === Released 2.19.7 === diff --git a/gobject/gobject.c b/gobject/gobject.c index d40d2ffb6..10a272321 100644 --- a/gobject/gobject.c +++ b/gobject/gobject.c @@ -807,7 +807,7 @@ g_object_freeze_notify (GObject *object) { g_return_if_fail (G_IS_OBJECT (object)); - if (g_atomic_int_get ((int *)&object->ref_count) == 0) + if (g_atomic_int_get (&object->ref_count) == 0) return; g_object_ref (object); @@ -830,7 +830,7 @@ g_object_notify (GObject *object, g_return_if_fail (G_IS_OBJECT (object)); g_return_if_fail (property_name != NULL); - if (g_atomic_int_get ((int *)&object->ref_count) == 0) + if (g_atomic_int_get (&object->ref_count) == 0) return; g_object_ref (object); @@ -875,7 +875,7 @@ g_object_thaw_notify (GObject *object) GObjectNotifyQueue *nqueue; g_return_if_fail (G_IS_OBJECT (object)); - if (g_atomic_int_get ((int *)&object->ref_count) == 0) + if (g_atomic_int_get (&object->ref_count) == 0) return; g_object_ref (object); @@ -2377,7 +2377,7 @@ g_object_unref (gpointer _object) /* here we want to atomically do: if (ref_count>1) { ref_count--; return; } */ retry_atomic_decrement1: - old_ref = g_atomic_int_get ((int *)&object->ref_count); + old_ref = g_atomic_int_get (&object->ref_count); if (old_ref > 1) { if (!g_atomic_int_compare_and_exchange ((int *)&object->ref_count, old_ref, old_ref - 1)) |