mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-10-01 00:05:25 +00:00
Drop the CALLS_FREE_PTR_PROPERTY() macro
Replace it by g_free() as it does the same thing.
This commit is contained in:
parent
52f7f2da6f
commit
3ebf58548c
3 changed files with 5 additions and 11 deletions
|
@ -303,9 +303,9 @@ finalize (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_FREE_PTR_PROPERTY (self->disconnect_reason);
|
g_free (self->disconnect_reason);
|
||||||
CALLS_FREE_PTR_PROPERTY (self->name);
|
g_free (self->name);
|
||||||
CALLS_FREE_PTR_PROPERTY (self->number);
|
g_free (self->number);
|
||||||
|
|
||||||
parent_class->finalize (object);
|
parent_class->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
|
@ -506,7 +506,7 @@ finalize (GObject *object)
|
||||||
{
|
{
|
||||||
g_string_free (self->tone_queue, TRUE);
|
g_string_free (self->tone_queue, TRUE);
|
||||||
}
|
}
|
||||||
CALLS_FREE_PTR_PROPERTY (self->name);
|
g_free (self->name);
|
||||||
|
|
||||||
parent_class->finalize (object);
|
parent_class->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,14 +80,8 @@ G_BEGIN_DECLS
|
||||||
g_object_ref (G_OBJECT (obj_ptr));
|
g_object_ref (G_OBJECT (obj_ptr));
|
||||||
|
|
||||||
|
|
||||||
#define CALLS_FREE_PTR_PROPERTY(ptr) \
|
|
||||||
if (ptr) \
|
|
||||||
{ \
|
|
||||||
g_free (ptr); \
|
|
||||||
} \
|
|
||||||
|
|
||||||
#define CALLS_SET_PTR_PROPERTY(ptr,new_value) \
|
#define CALLS_SET_PTR_PROPERTY(ptr,new_value) \
|
||||||
CALLS_FREE_PTR_PROPERTY (ptr) \
|
g_free (ptr); \
|
||||||
ptr = new_value;
|
ptr = new_value;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue