[PATCH] Remove accidental GLib 2.28 dependency.
Will Thompson
will.thompson at collabora.co.uk
Fri Jan 28 04:00:16 PST 2011
g_simple_async_result_take_error() and g_list_free_full() were added in
GLib 2.28, which we don't claim to depend on.
---
telepathy-glib/contact-search-result.c | 5 ++---
telepathy-glib/contact-search.c | 12 ++++++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/telepathy-glib/contact-search-result.c b/telepathy-glib/contact-search-result.c
index a47e7ee..b542faa 100644
--- a/telepathy-glib/contact-search-result.c
+++ b/telepathy-glib/contact-search-result.c
@@ -134,9 +134,8 @@ tp_contact_search_result_dispose (GObject *object)
tp_clear_pointer (&self->priv->identifier, g_free);
- g_list_free_full (self->priv->fields,
- (GDestroyNotify) tp_contact_info_field_free);
- self->priv->fields = NULL;
+ g_list_foreach (self->priv->fields, (GFunc) tp_contact_info_field_free, NULL);
+ tp_clear_pointer (&self->priv->fields, g_list_free);
G_OBJECT_CLASS (tp_contact_search_result_parent_class)->dispose (object);
}
diff --git a/telepathy-glib/contact-search.c b/telepathy-glib/contact-search.c
index 1f9ba35..f9b9515 100644
--- a/telepathy-glib/contact-search.c
+++ b/telepathy-glib/contact-search.c
@@ -181,7 +181,8 @@ _search_results_received (TpChannel *channel,
DEBUG ("SearchResultsReceived (%i results)", g_hash_table_size (result));
g_signal_emit (object, _signals[SEARCH_RESULTS_RECEIVED], 0, results);
- g_list_free_full (results, g_object_unref);
+ g_list_foreach (results, (GFunc) g_object_unref, NULL);
+ g_list_free (results);
}
static void
@@ -209,7 +210,8 @@ _create_search_channel_cb (GObject *source_object,
if (error != NULL)
{
DEBUG ("Failed to create search channel: %s", error->message);
- g_simple_async_result_take_error (self->priv->async_res, error);
+ g_simple_async_result_set_from_error (self->priv->async_res, error);
+ g_error_free (error);
goto out;
}
@@ -222,7 +224,8 @@ _create_search_channel_cb (GObject *source_object,
{
DEBUG ("Failed to connect SearchResultReceived: %s", error->message);
close_search_channel (self);
- g_simple_async_result_take_error (self->priv->async_res, error);
+ g_simple_async_result_set_from_error (self->priv->async_res, error);
+ g_error_free (error);
goto out;
}
@@ -233,7 +236,8 @@ _create_search_channel_cb (GObject *source_object,
{
DEBUG ("Failed to connect SearchStateChanged: %s", error->message);
close_search_channel (self);
- g_simple_async_result_take_error (self->priv->async_res, error);
+ g_simple_async_result_set_from_error (self->priv->async_res, error);
+ g_error_free (error);
goto out;
}
--
1.7.2.3
--------------010608080803080502060809--
More information about the telepathy
mailing list