diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-08-28 12:26:54 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-08-28 12:26:54 +0100 |
commit | 8b3135ad57664953c757361e581038a4ca2014c5 (patch) | |
tree | 0c82eae23bf7af9b3423f750fc8c37f32c7474ba /telepathy-glib/debug-sender.c | |
parent | 5e1c7ddae69d85a751aaaa948cca47fffa1af411 (diff) | |
download | telepathy-glib-8b3135ad57664953c757361e581038a4ca2014c5.tar.gz |
Use TP_STRUCT_TYPE_DEBUG_MESSAGE instead of using dbus_g_type_get_struct.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/debug-sender.c')
-rw-r--r-- | telepathy-glib/debug-sender.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/telepathy-glib/debug-sender.c b/telepathy-glib/debug-sender.c index 1231b1865..173550371 100644 --- a/telepathy-glib/debug-sender.c +++ b/telepathy-glib/debug-sender.c @@ -21,6 +21,7 @@ #include "config.h" #include <telepathy-glib/dbus.h> +#include <telepathy-glib/gtypes.h> #include <telepathy-glib/interfaces.h> #include <telepathy-glib/util.h> @@ -280,17 +281,9 @@ get_messages (TpSvcDebug *self, { TpDebugSender *dbg = TP_DEBUG_SENDER (self); GPtrArray *messages; - static GType struct_type = 0; GList *i; guint j; - if (G_UNLIKELY (struct_type == 0)) - { - struct_type = dbus_g_type_get_struct ( - "GValueArray", G_TYPE_DOUBLE, G_TYPE_STRING, G_TYPE_UINT, - G_TYPE_STRING, G_TYPE_INVALID); - } - messages = g_ptr_array_sized_new (g_queue_get_length (dbg->priv->messages)); for (i = dbg->priv->messages->head; i; i = i->next) @@ -298,9 +291,9 @@ get_messages (TpSvcDebug *self, GValue gvalue = { 0 }; DebugMessage *message = (DebugMessage *) i->data; - g_value_init (&gvalue, struct_type); + g_value_init (&gvalue, TP_STRUCT_TYPE_DEBUG_MESSAGE); g_value_take_boxed (&gvalue, - dbus_g_type_specialized_construct (struct_type)); + dbus_g_type_specialized_construct (TP_STRUCT_TYPE_DEBUG_MESSAGE)); dbus_g_type_struct_set (&gvalue, 0, message->timestamp, 1, message->domain, @@ -313,7 +306,7 @@ get_messages (TpSvcDebug *self, tp_svc_debug_return_from_get_messages (context, messages); for (j = 0; j < messages->len; j++) - g_boxed_free (struct_type, messages->pdata[j]); + g_boxed_free (TP_STRUCT_TYPE_DEBUG_MESSAGE, messages->pdata[j]); g_ptr_array_free (messages, TRUE); } |