summaryrefslogtreecommitdiff
path: root/telepathy-glib/channel-group.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2009-03-04 16:00:35 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2009-03-04 16:00:35 +0000
commit00cf20e35ed4cec3050fcfc7a8a1ec91e78377de (patch)
tree3229a98cac9f9f48ce15d97f07d04062ecbb13bc /telepathy-glib/channel-group.c
parent14e788f5bf8984bd880999108edc0cbf1e810684 (diff)
downloadtelepathy-glib-00cf20e35ed4cec3050fcfc7a8a1ec91e78377de.tar.gz
TpChannel: use tp_g_slice_new_uint() etc. to elide temporary GValues
Diffstat (limited to 'telepathy-glib/channel-group.c')
-rw-r--r--telepathy-glib/channel-group.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/telepathy-glib/channel-group.c b/telepathy-glib/channel-group.c
index fdba0c167..fabde5724 100644
--- a/telepathy-glib/channel-group.c
+++ b/telepathy-glib/channel-group.c
@@ -959,7 +959,6 @@ tp_channel_group_members_changed_cb (TpChannel *self,
{
GHashTable *details = g_hash_table_new_full (g_str_hash, g_str_equal, NULL,
(GDestroyNotify) tp_g_value_slice_free);
- GValue *v;
DEBUG ("%p MembersChanged: added %u, removed %u, "
"moved %u to LP and %u to RP, actor %u, reason %u, message %s",
@@ -968,23 +967,20 @@ tp_channel_group_members_changed_cb (TpChannel *self,
if (actor != 0)
{
- v = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (v, actor);
- g_hash_table_insert (details, "actor", v);
+ g_hash_table_insert (details, "actor",
+ tp_g_value_slice_new_uint (actor));
}
if (reason != TP_CHANNEL_GROUP_CHANGE_REASON_NONE)
{
- v = tp_g_value_slice_new (G_TYPE_UINT);
- g_value_set_uint (v, reason);
- g_hash_table_insert (details, "change-reason", v);
+ g_hash_table_insert (details, "change-reason",
+ tp_g_value_slice_new_uint (reason));
}
if (*message != '\0')
{
- v = tp_g_value_slice_new (G_TYPE_STRING);
- g_value_set_string (v, message);
- g_hash_table_insert (details, "message", v);
+ g_hash_table_insert (details, "message",
+ tp_g_value_slice_new_string (message));
}
handle_members_changed (self, message, added, removed, local_pending,