[next] telepathy-glib: _tp_g_list_copy_deep: remove
Simon McVittie
smcv at kemper.freedesktop.org
Tue Mar 18 07:03:27 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 73c4586e7d2a7e69e1b6c185a93c454624874f50
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=73c4586e7d2a7e69e1b6c185a93c454624874f50
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Tue Mar 18 12:09:31 2014 +0000
_tp_g_list_copy_deep: remove
g_list_copy_deep is in GLib 2.34.
Reviewed-by: Guillaume Desmottes
---
telepathy-glib/base-client.c | 2 +-
telepathy-glib/connection-contact-info.c | 6 +++---
telepathy-glib/contact-search-result.c | 2 +-
telepathy-glib/contact.c | 2 +-
telepathy-glib/text-channel.c | 2 +-
telepathy-glib/util-internal.h | 5 -----
telepathy-glib/util.c | 21 +--------------------
7 files changed, 8 insertions(+), 32 deletions(-)
diff --git a/telepathy-glib/base-client.c b/telepathy-glib/base-client.c
index 403b693..c400b2c 100644
--- a/telepathy-glib/base-client.c
+++ b/telepathy-glib/base-client.c
@@ -988,7 +988,7 @@ tp_base_client_dup_pending_requests (TpBaseClient *self)
{
g_return_val_if_fail (self->priv->flags & CLIENT_IS_HANDLER, NULL);
- return _tp_g_list_copy_deep (self->priv->pending_requests,
+ return g_list_copy_deep (self->priv->pending_requests,
(GCopyFunc) g_object_ref, NULL);
}
diff --git a/telepathy-glib/connection-contact-info.c b/telepathy-glib/connection-contact-info.c
index c291a4f..611ad1d 100644
--- a/telepathy-glib/connection-contact-info.c
+++ b/telepathy-glib/connection-contact-info.c
@@ -160,7 +160,7 @@ G_DEFINE_BOXED_TYPE (TpContactInfoFieldSpec, tp_contact_info_field_spec,
GList *
tp_contact_info_spec_list_copy (GList *list)
{
- return _tp_g_list_copy_deep (list,
+ return g_list_copy_deep (list,
(GCopyFunc) tp_contact_info_field_spec_copy, NULL);
}
@@ -310,7 +310,7 @@ G_DEFINE_BOXED_TYPE (TpContactInfoField, tp_contact_info_field,
GList *
tp_contact_info_list_copy (GList *list)
{
- return _tp_g_list_copy_deep (list,
+ return g_list_copy_deep (list,
(GCopyFunc) tp_contact_info_field_copy, NULL);
}
@@ -481,7 +481,7 @@ tp_connection_dup_contact_info_supported_fields (TpConnection *self)
{
g_return_val_if_fail (TP_IS_CONNECTION (self), NULL);
- return _tp_g_list_copy_deep (self->priv->contact_info_supported_fields,
+ return g_list_copy_deep (self->priv->contact_info_supported_fields,
(GCopyFunc) tp_contact_info_field_spec_copy, NULL);
}
diff --git a/telepathy-glib/contact-search-result.c b/telepathy-glib/contact-search-result.c
index 771b624..9a4ab51 100644
--- a/telepathy-glib/contact-search-result.c
+++ b/telepathy-glib/contact-search-result.c
@@ -258,6 +258,6 @@ tp_contact_search_result_dup_fields (TpContactSearchResult *self)
{
g_return_val_if_fail (TP_IS_CONTACT_SEARCH_RESULT (self), NULL);
- return _tp_g_list_copy_deep (self->priv->fields,
+ return g_list_copy_deep (self->priv->fields,
(GCopyFunc) tp_contact_info_field_copy, NULL);
}
diff --git a/telepathy-glib/contact.c b/telepathy-glib/contact.c
index ee9a8c6..e127f74 100644
--- a/telepathy-glib/contact.c
+++ b/telepathy-glib/contact.c
@@ -795,7 +795,7 @@ tp_contact_dup_contact_info (TpContact *self)
{
g_return_val_if_fail (TP_IS_CONTACT (self), NULL);
- return _tp_g_list_copy_deep (self->priv->contact_info,
+ return g_list_copy_deep (self->priv->contact_info,
(GCopyFunc) tp_contact_info_field_copy, NULL);
}
diff --git a/telepathy-glib/text-channel.c b/telepathy-glib/text-channel.c
index 57c0630..36243dd 100644
--- a/telepathy-glib/text-channel.c
+++ b/telepathy-glib/text-channel.c
@@ -1231,7 +1231,7 @@ tp_text_channel_get_feature_quark_incoming_messages (void)
GList *
tp_text_channel_dup_pending_messages (TpTextChannel *self)
{
- return _tp_g_list_copy_deep (
+ return g_list_copy_deep (
g_queue_peek_head_link (self->priv->pending_messages),
(GCopyFunc) g_object_ref, NULL);
}
diff --git a/telepathy-glib/util-internal.h b/telepathy-glib/util-internal.h
index bcc5248..65bd84a 100644
--- a/telepathy-glib/util-internal.h
+++ b/telepathy-glib/util-internal.h
@@ -104,9 +104,4 @@ GPtrArray *_tp_contacts_from_values (GHashTable *table);
GList *_tp_object_list_copy (GList *l);
void _tp_object_list_free (GList *l);
-/* This can be removed once we depend on GLib 2.34 */
-GList *_tp_g_list_copy_deep (GList *list,
- GCopyFunc func,
- gpointer user_data);
-
#endif /* __TP_UTIL_INTERNAL_H__ */
diff --git a/telepathy-glib/util.c b/telepathy-glib/util.c
index 6f5f511..1f44576 100644
--- a/telepathy-glib/util.c
+++ b/telepathy-glib/util.c
@@ -1768,7 +1768,7 @@ _tp_contacts_from_values (GHashTable *table)
GList *
_tp_object_list_copy (GList *l)
{
- return _tp_g_list_copy_deep (l, (GCopyFunc) g_object_ref, NULL);
+ return g_list_copy_deep (l, (GCopyFunc) g_object_ref, NULL);
}
/*
@@ -1784,22 +1784,3 @@ _tp_object_list_free (GList *l)
{
g_list_free_full (l, g_object_unref);
}
-
-GList *
-_tp_g_list_copy_deep (GList *list,
- GCopyFunc func,
- gpointer user_data)
-{
- GList *ret = NULL;
- GList *l;
-
- ret = g_list_copy (list);
-
- if (func != NULL)
- {
- for (l = ret; l != NULL; l = l->next)
- l->data = func (l->data, user_data);
- }
-
- return ret;
-}
More information about the telepathy-commits
mailing list