1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2025-01-07 12:25:31 +00:00

Drop the CALLS_DISPOSE_OBJECT() macro

Replace it by g_clear_object() as it does the same thing.
This commit is contained in:
Adrien Plazas 2018-08-03 11:08:55 +02:00
parent 700966ccfe
commit 52f7f2da6f
10 changed files with 18 additions and 26 deletions

View file

@ -116,8 +116,8 @@ dispose (GObject *object)
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT); GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
CallsCallData *self = CALLS_CALL_DATA (object); CallsCallData *self = CALLS_CALL_DATA (object);
CALLS_DISPOSE_OBJECT (self->call); g_clear_object (&self->call);
CALLS_DISPOSE_OBJECT (self->party); g_clear_object (&self->party);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -279,7 +279,7 @@ dispose (GObject *object)
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_BOX); GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_BOX);
CallsCallDisplay *self = CALLS_CALL_DISPLAY (object); CallsCallDisplay *self = CALLS_CALL_DISPLAY (object);
CALLS_DISPOSE_OBJECT (self->call); g_clear_object (&self->call);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -134,9 +134,9 @@ dispose (GObject *object)
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT); GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
CallsCallHolder *self = CALLS_CALL_HOLDER (object); CallsCallHolder *self = CALLS_CALL_HOLDER (object);
CALLS_DISPOSE_OBJECT (self->selector_item); g_clear_object (&self->selector_item);
CALLS_DISPOSE_OBJECT (self->display); g_clear_object (&self->display);
CALLS_DISPOSE_OBJECT (self->data); g_clear_object (&self->data);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -191,7 +191,7 @@ dispose (GObject *object)
GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_EVENT_BOX); GObjectClass *parent_class = g_type_class_peek (GTK_TYPE_EVENT_BOX);
CallsCallSelectorItem *self = CALLS_CALL_SELECTOR_ITEM (object); CallsCallSelectorItem *self = CALLS_CALL_SELECTOR_ITEM (object);
CALLS_DISPOSE_OBJECT (self->holder); g_clear_object (&self->holder);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -688,8 +688,8 @@ dispose (GObject *object)
remove_origins (self); remove_origins (self);
} }
CALLS_DISPOSE_OBJECT (self->call_holders); g_clear_object (&self->call_holders);
CALLS_DISPOSE_OBJECT (self->provider); g_clear_object (&self->provider);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -291,7 +291,7 @@ dispose (GObject *object)
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT); GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
CallsOfonoCall *self = CALLS_OFONO_CALL (object); CallsOfonoCall *self = CALLS_OFONO_CALL (object);
CALLS_DISPOSE_OBJECT (self->voice_call); g_clear_object (&self->voice_call);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -130,9 +130,9 @@ dispose (GObject *object)
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT); GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
CallsOfonoObject *self = CALLS_OFONO_OBJECT (object); CallsOfonoObject *self = CALLS_OFONO_OBJECT (object);
CALLS_DISPOSE_OBJECT (self->selector_item); g_clear_object (&self->selector_item);
CALLS_DISPOSE_OBJECT (self->display); g_clear_object (&self->display);
CALLS_DISPOSE_OBJECT (self->data); g_clear_object (&self->data);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -476,7 +476,7 @@ constructed (GObject *object)
(GAsyncReadyCallback)voice_new_cb, (GAsyncReadyCallback)voice_new_cb,
self); self);
CALLS_DISPOSE_OBJECT (self->modem); g_clear_object (&self->modem);
parent_class->constructed (object); parent_class->constructed (object);
} }
@ -489,8 +489,8 @@ dispose (GObject *object)
CallsOfonoOrigin *self = CALLS_OFONO_ORIGIN (object); CallsOfonoOrigin *self = CALLS_OFONO_ORIGIN (object);
remove_calls (self, NULL); remove_calls (self, NULL);
CALLS_DISPOSE_OBJECT (self->modem); g_clear_object (&self->modem);
CALLS_DISPOSE_OBJECT (self->connection); g_clear_object (&self->connection);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -442,8 +442,8 @@ dispose (GObject *object)
// FIXME // FIXME
CALLS_DISPOSE_OBJECT (self->manager); g_clear_object (&self->manager);
CALLS_DISPOSE_OBJECT (self->connection); g_clear_object (&self->connection);
parent_class->dispose (object); parent_class->dispose (object);
} }

View file

@ -71,14 +71,6 @@ G_BEGIN_DECLS
#define CALLS_DISPOSE_OBJECT(obj_ptr) \
if (obj_ptr) \
{ \
g_object_unref (G_OBJECT (obj_ptr)); \
obj_ptr = NULL; \
}
#define CALLS_SET_OBJECT_PROPERTY(obj_ptr,new_value) \ #define CALLS_SET_OBJECT_PROPERTY(obj_ptr,new_value) \
if (obj_ptr) \ if (obj_ptr) \
{ \ { \