[farsight2/master] Use g_object_unref directly instead of having a function wrapping it

Olivier Crête olivier.crete at collabora.co.uk
Tue Dec 23 15:26:24 PST 2008


---
 transmitters/nice/fs-nice-thread.c |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

diff --git a/transmitters/nice/fs-nice-thread.c b/transmitters/nice/fs-nice-thread.c
index baefd38..2f6b4a4 100644
--- a/transmitters/nice/fs-nice-thread.c
+++ b/transmitters/nice/fs-nice-thread.c
@@ -214,19 +214,12 @@ fs_nice_thread_get_context (FsNiceThread *self)
   return self->priv->main_context;
 }
 
-static void
-object_dead (gpointer data, GObject *where_the_object_was)
-{
-  FsNiceThread *self = FS_NICE_THREAD (data);
-
-  g_object_unref (self);
-}
 
 void
 fs_nice_thread_add_weak_object (FsNiceThread *self,
     GObject *object)
 {
-  g_object_weak_ref (G_OBJECT (object), object_dead, self);
+  g_object_weak_ref (G_OBJECT (object), (GWeakNotify) g_object_unref, self);
 
   g_object_ref (self);
 }
-- 
1.5.6.5




More information about the farsight-commits mailing list