1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-12 15:47:35 +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:
Adrien Plazas 2018-08-03 11:14:46 +02:00
parent 52f7f2da6f
commit 3ebf58548c
3 changed files with 5 additions and 11 deletions

View file

@ -303,9 +303,9 @@ finalize (GObject *object)
GObjectClass *parent_class = g_type_class_peek (G_TYPE_OBJECT);
CallsOfonoCall *self = CALLS_OFONO_CALL (object);
CALLS_FREE_PTR_PROPERTY (self->disconnect_reason);
CALLS_FREE_PTR_PROPERTY (self->name);
CALLS_FREE_PTR_PROPERTY (self->number);
g_free (self->disconnect_reason);
g_free (self->name);
g_free (self->number);
parent_class->finalize (object);
}

View file

@ -506,7 +506,7 @@ finalize (GObject *object)
{
g_string_free (self->tone_queue, TRUE);
}
CALLS_FREE_PTR_PROPERTY (self->name);
g_free (self->name);
parent_class->finalize (object);
}

View file

@ -80,14 +80,8 @@ G_BEGIN_DECLS
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) \
CALLS_FREE_PTR_PROPERTY (ptr) \
g_free (ptr); \
ptr = new_value;