summaryrefslogtreecommitdiff
path: root/telepathy-glib
diff options
context:
space:
mode:
Diffstat (limited to 'telepathy-glib')
-rw-r--r--telepathy-glib/base-client.c22
-rw-r--r--telepathy-glib/base-contact-list.c3
-rw-r--r--telepathy-glib/channel-dispatch-operation.c6
-rw-r--r--telepathy-glib/contact.c2
-rw-r--r--telepathy-glib/util-internal.h4
-rw-r--r--telepathy-glib/util.c2
6 files changed, 16 insertions, 23 deletions
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index 4d684d017..ab67288ae 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -1641,8 +1641,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
goto out;
}
- channels = _tp_g_ptr_array_sized_new_with_free_func (channels_arr->len,
- g_object_unref);
+ channels = _tp_g_ptr_array_new_full (channels_arr->len, g_object_unref);
for (i = 0; i < channels_arr->len; i++)
{
const gchar *chan_path;
@@ -1681,8 +1680,7 @@ _tp_base_client_observe_channels (TpSvcClientObserver *iface,
}
}
- requests = _tp_g_ptr_array_sized_new_with_free_func (requests_arr->len,
- g_object_unref);
+ requests = _tp_g_ptr_array_new_full (requests_arr->len, g_object_unref);
for (i = 0; i < requests_arr->len; i++)
{
const gchar *req_path = g_ptr_array_index (requests_arr, i);
@@ -1863,8 +1861,7 @@ _tp_base_client_add_dispatch_operation (TpSvcClientApprover *iface,
goto out;
}
- channels = _tp_g_ptr_array_sized_new_with_free_func (channels_arr->len,
- g_object_unref);
+ channels = _tp_g_ptr_array_new_full (channels_arr->len, g_object_unref);
for (i = 0; i < channels_arr->len; i++)
{
const gchar *chan_path;
@@ -2213,8 +2210,7 @@ _tp_base_client_handle_channels (TpSvcClientHandler *iface,
goto out;
}
- channels = _tp_g_ptr_array_sized_new_with_free_func (channels_arr->len,
- g_object_unref);
+ channels = _tp_g_ptr_array_new_full (channels_arr->len, g_object_unref);
for (i = 0; i < channels_arr->len; i++)
{
const gchar *chan_path;
@@ -2235,8 +2231,7 @@ _tp_base_client_handle_channels (TpSvcClientHandler *iface,
g_ptr_array_add (channels, channel);
}
- requests = _tp_g_ptr_array_sized_new_with_free_func (requests_arr->len,
- g_object_unref);
+ requests = _tp_g_ptr_array_new_full (requests_arr->len, g_object_unref);
for (i = 0; i < requests_arr->len; i++)
{
const gchar *req_path = g_ptr_array_index (requests_arr, i);
@@ -2965,8 +2960,8 @@ delegate_channels_ctx_new (GList *channels)
DelegateChannelsCtx *ctx = g_slice_new0 (DelegateChannelsCtx);
GList *l;
- ctx->channels = _tp_g_ptr_array_sized_new_with_free_func (
- g_list_length (channels), g_object_unref);
+ ctx->channels = _tp_g_ptr_array_new_full (g_list_length (channels),
+ g_object_unref);
for (l = channels; l != NULL; l = g_list_next (l))
{
@@ -3111,8 +3106,7 @@ tp_base_client_delegate_channels_async (TpBaseClient *self,
cd = tp_channel_dispatcher_new (self->priv->dbus);
- chans = _tp_g_ptr_array_sized_new_with_free_func (g_list_length (channels),
- g_free);
+ chans = _tp_g_ptr_array_new_full (g_list_length (channels), g_free);
for (l = channels; l != NULL; l = g_list_next (l))
{
diff --git a/telepathy-glib/base-contact-list.c b/telepathy-glib/base-contact-list.c
index c247316a1..1168e7427 100644
--- a/telepathy-glib/base-contact-list.c
+++ b/telepathy-glib/base-contact-list.c
@@ -3634,8 +3634,7 @@ tp_base_contact_list_groups_removed (TpBaseContactList *self,
return;
old_members = tp_handle_set_new (self->priv->contact_repo);
- actually_removed = _tp_g_ptr_array_sized_new_with_free_func (n_removed + 1,
- g_free);
+ actually_removed = _tp_g_ptr_array_new_full (n_removed + 1, g_free);
for (i = 0; i < n_removed; i++)
{
diff --git a/telepathy-glib/channel-dispatch-operation.c b/telepathy-glib/channel-dispatch-operation.c
index 8e7285961..9926c7a57 100644
--- a/telepathy-glib/channel-dispatch-operation.c
+++ b/telepathy-glib/channel-dispatch-operation.c
@@ -515,7 +515,7 @@ update_channels_array (TpChannelDispatchOperation *self,
old = self->priv->channels;
}
- self->priv->channels = _tp_g_ptr_array_sized_new_with_free_func (channels->len,
+ self->priv->channels = _tp_g_ptr_array_new_full (channels->len,
g_object_unref);
for (i = 0; i < channels->len; i++)
@@ -1270,8 +1270,8 @@ _tp_channel_dispatch_operation_ensure_channels (TpChannelDispatchOperation *self
return;
/* Do not just ref the GPtrArray because we'll modify its content */
- self->priv->channels = _tp_g_ptr_array_sized_new_with_free_func (
- channels->len, g_object_unref);
+ self->priv->channels = _tp_g_ptr_array_new_full (channels->len,
+ g_object_unref);
for (i = 0; i < channels->len; i++)
g_ptr_array_add (self->priv->channels,
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index 612b08dff..6322423b0 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -3395,7 +3395,7 @@ contact_maybe_set_contact_groups (TpContact *self,
self->priv->has_features |= CONTACT_FEATURE_FLAG_CONTACT_GROUPS;
tp_clear_pointer (&self->priv->contact_groups, g_ptr_array_unref);
- self->priv->contact_groups = _tp_g_ptr_array_sized_new_with_free_func (
+ self->priv->contact_groups = _tp_g_ptr_array_new_full (
g_strv_length (contact_groups) + 1, g_free);
for (iter = contact_groups; *iter != NULL; iter++)
diff --git a/telepathy-glib/util-internal.h b/telepathy-glib/util-internal.h
index acef3718d..e3f39518e 100644
--- a/telepathy-glib/util-internal.h
+++ b/telepathy-glib/util-internal.h
@@ -79,8 +79,8 @@ GList * _tp_create_channel_request_list (TpSimpleClientFactory *factory,
gboolean _tp_bind_connection_status_to_boolean (GBinding *binding,
const GValue *src_value, GValue *dest_value, gpointer user_data);
-/* Suggested to include in GLib: bug #654450 */
-GPtrArray *_tp_g_ptr_array_sized_new_with_free_func (guint reserved_size,
+/* Included in GLib >=2.29.15: bug #654450 */
+GPtrArray *_tp_g_ptr_array_new_full (guint reserved_size,
GDestroyNotify element_free_func);
gboolean _tp_set_socket_address_type_and_access_control_type (
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c
index 269ee6121..305cf076f 100644
--- a/telepathy-glib/util.c
+++ b/telepathy-glib/util.c
@@ -1680,7 +1680,7 @@ _tp_bind_connection_status_to_boolean (GBinding *binding,
}
GPtrArray *
-_tp_g_ptr_array_sized_new_with_free_func (guint reserved_size,
+_tp_g_ptr_array_new_full (guint reserved_size,
GDestroyNotify element_free_func)
{
GPtrArray *array;