summaryrefslogtreecommitdiff
path: root/telepathy-glib/channel-dispatch-operation.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-07-12 12:31:31 +0200
committerXavier Claessens <xclaesse@gmail.com>2011-07-12 12:42:46 +0200
commitebf70605418bd424e32973d49b6e3d86e053524c (patch)
tree1b6d34b61834248aef88400551b7b2e3386ada6e /telepathy-glib/channel-dispatch-operation.c
parent83858d2f09064fa00011ffca1608b4619c941f7a (diff)
downloadtelepathy-glib-ebf70605418bd424e32973d49b6e3d86e053524c.tar.gz
Factor out _tp_g_ptr_array_sized_new_with_free_func()
Diffstat (limited to 'telepathy-glib/channel-dispatch-operation.c')
-rw-r--r--telepathy-glib/channel-dispatch-operation.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index a1250a11c..8ccb65260 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -380,9 +380,8 @@ tp_channel_dispatch_operation_set_property (GObject *object,
if (tmp == NULL)
break;
- self->priv->channels = g_ptr_array_sized_new (tmp->len);
- g_ptr_array_set_free_func (self->priv->channels,
- (GDestroyNotify) g_object_unref);
+ self->priv->channels = _tp_g_ptr_array_sized_new_with_free_func (
+ tmp->len, g_object_unref);
for (i = 0; i < tmp->len; i++)
g_ptr_array_add (self->priv->channels,
@@ -536,9 +535,8 @@ update_channels_array (TpChannelDispatchOperation *self,
old = self->priv->channels;
}
- self->priv->channels = g_ptr_array_sized_new (channels->len);
- g_ptr_array_set_free_func (self->priv->channels,
- (GDestroyNotify) g_object_unref);
+ self->priv->channels = _tp_g_ptr_array_sized_new_with_free_func (channels->len,
+ g_object_unref);
for (i = 0; i < channels->len; i++)
{