[next] telepathy-gabble: search-manager: use tp_asv_new()

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Tue May 13 05:13:53 PDT 2014


Module: telepathy-gabble
Branch: next
Commit: 3e607035afaba2637d0873dbda04199580b024aa
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=3e607035afaba2637d0873dbda04199580b024aa

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Tue May 13 11:58:11 2014 +0200

search-manager: use tp_asv_new()

---

 src/search-manager.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/search-manager.c b/src/search-manager.c
index 0e233bd..66a25a3 100644
--- a/src/search-manager.c
+++ b/src/search-manager.c
@@ -332,14 +332,12 @@ gabble_search_manager_type_foreach_channel_class (GType type,
     TpChannelManagerTypeChannelClassFunc func,
     gpointer user_data)
 {
-  GHashTable *table = g_hash_table_new_full (g_str_hash, g_str_equal,
-      NULL, (GDestroyNotify) tp_g_value_slice_free);
-  GValue *value;
-
-  value = tp_g_value_slice_new_string (
-      TP_IFACE_CHANNEL_TYPE_CONTACT_SEARCH1);
-  g_hash_table_insert (table, (gchar *) search_channel_fixed_properties[0],
-      value);
+  GHashTable *table;
+
+  table = tp_asv_new (
+      TP_PROP_CHANNEL_CHANNEL_TYPE, G_TYPE_STRING,
+        TP_IFACE_CHANNEL_TYPE_CONTACT_SEARCH1,
+      NULL);
 
   func (type, table, search_channel_allowed_properties, user_data);
 



More information about the telepathy-commits mailing list