diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-08-24 17:26:43 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2009-08-24 17:26:43 +0100 |
commit | fa9f78df4517332f4045a98e012e421d2b4d9eb1 (patch) | |
tree | b5fd54e8be8ecd0152df4426ed3f81f2016303c8 /telepathy-glib/debug-sender.c | |
parent | a3346370f23511fd8a621cf39cee4e9ec120e15a (diff) | |
download | telepathy-glib-fa9f78df4517332f4045a98e012e421d2b4d9eb1.tar.gz |
Make the debug_sender singleton a gpointer.
Also remove a completely unnecessary and weird g_object_new from
constructed...
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 | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/telepathy-glib/debug-sender.c b/telepathy-glib/debug-sender.c index 555248215..b10c3919a 100644 --- a/telepathy-glib/debug-sender.c +++ b/telepathy-glib/debug-sender.c @@ -64,7 +64,7 @@ * Since: 0.7.UNRELEASED */ -static TpDebugSender *debug_sender = NULL; +static gpointer debug_sender = NULL; /* On the basis that messages are around 60 bytes on average, and that 50kb is * a reasonable maximum size for a frame buffer. @@ -200,16 +200,16 @@ tp_debug_sender_constructor (GType type, { GObject *retval; - if (!debug_sender) + if (debug_sender == NULL) { retval = G_OBJECT_CLASS (tp_debug_sender_parent_class)->constructor ( type, n_construct_params, construct_params); - debug_sender = TP_DEBUG_SENDER (retval); - g_object_add_weak_pointer (retval, (gpointer) &debug_sender); + debug_sender = (gpointer) retval; + g_object_add_weak_pointer (retval, &debug_sender); } else { - retval = g_object_ref (debug_sender); + retval = g_object_ref (G_OBJECT (debug_sender)); } return retval; @@ -220,7 +220,6 @@ tp_debug_sender_constructed (GObject *object) { TpDBusDaemon *dbus_daemon; - debug_sender = g_object_new (TP_TYPE_DEBUG_SENDER, NULL); dbus_daemon = tp_dbus_daemon_dup (NULL); if (dbus_daemon != NULL) |