[next] telepathy-glib: tp_dbus_daemon_try_register_object: avoid GSList
Simon McVittie
smcv at kemper.freedesktop.org
Thu Mar 27 12:59:54 PDT 2014
Module: telepathy-glib
Branch: next
Commit: 49e67694087d4841dfb400b901e6bb1dbde49608
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=49e67694087d4841dfb400b901e6bb1dbde49608
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Wed Mar 26 18:40:12 2014 +0000
tp_dbus_daemon_try_register_object: avoid GSList
The space optimization is hardly relevant here.
"I think GSList's only purpose is making your app crash if you use
g_list_free on it" -xclaesse
---
telepathy-glib/dbus-daemon.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/telepathy-glib/dbus-daemon.c b/telepathy-glib/dbus-daemon.c
index 3602ca8..68be4bf 100644
--- a/telepathy-glib/dbus-daemon.c
+++ b/telepathy-glib/dbus-daemon.c
@@ -371,7 +371,7 @@ struct _Registration {
/* (transfer full) */
gchar *object_path;
/* (transfer full) */
- GSList *skeletons;
+ GList *skeletons;
};
static GQuark
@@ -391,7 +391,7 @@ static void
tp_dbus_daemon_registration_free (gpointer p)
{
Registration *r = p;
- GSList *iter;
+ GList *iter;
DEBUG ("%s (r=%p)", r->object_path, r);
@@ -403,7 +403,7 @@ tp_dbus_daemon_registration_free (gpointer p)
g_object_unref (iter->data);
}
- g_slist_free (r->skeletons);
+ g_list_free (r->skeletons);
g_free (r->object_path);
g_clear_object (&r->conn);
g_slice_free (Registration, r);
@@ -565,7 +565,7 @@ tp_dbus_daemon_try_register_object (TpDBusDaemon *self,
goto finally;
}
- r->skeletons = g_slist_prepend (r->skeletons, skeleton);
+ r->skeletons = g_list_prepend (r->skeletons, skeleton);
DEBUG ("- %s skeleton %p (wrapping %s %p)",
iinfo->interface_info->name, skeleton, g_type_name (iface), object);
More information about the telepathy-commits
mailing list