Use G_SOURCE_CONTINUE/REMOVE internally
authorMatthias Clasen <mclasen@redhat.com>
Wed, 25 Jan 2012 13:53:05 +0000 (08:53 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 25 Jan 2012 21:15:18 +0000 (16:15 -0500)
Now that we have these macros, we should use them.
This commit covers everything in glib/.

glib/gmain.c
glib/tests/mainloop.c
glib/tests/spawn-multithreaded.c
glib/tests/spawn-singlethread.c
glib/tests/timeout.c
glib/tests/unix.c

index 4a79cb9..b1e3eee 100644 (file)
@@ -2358,7 +2358,7 @@ g_main_current_source (void)
  *   self->idle_id = 0;
  *   GDK_THREADS_LEAVE (<!-- -->);
  *    
- *   return FALSE;
+ *   return G_SOURCE_REMOVE;
  * }
  *  
  * static void 
index 980f7f5..7372f97 100644 (file)
@@ -219,7 +219,7 @@ call_func (gpointer data)
 {
   func (g_thread_self ());
 
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static gpointer
index 534766b..3f632f4 100644 (file)
@@ -104,7 +104,7 @@ on_child_exited (GPid     pid,
   if (data->child_exited && data->stdout_done)
     g_main_loop_quit (data->loop);
   
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static gboolean
index f29ecb8..42d88e6 100644 (file)
@@ -46,7 +46,7 @@ on_child_exited (GPid     pid,
   if (data->child_exited && data->stdout_done)
     g_main_loop_quit (data->loop);
   
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static gboolean
index 88d5ffe..2d78723 100644 (file)
@@ -8,13 +8,15 @@ stop_waiting (gpointer data)
 {
   g_main_loop_quit (loop);
 
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static gboolean
 function (gpointer data)
 {
   g_assert_not_reached ();
+
+  return G_SOURCE_REMOVE;
 }
 
 static void
index feb2bb4..77ee61e 100644 (file)
@@ -71,7 +71,7 @@ on_sig_received (gpointer user_data)
   GMainLoop *loop = user_data;
   g_main_loop_quit (loop);
   sig_received = TRUE;
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static gboolean
@@ -80,7 +80,7 @@ sig_not_received (gpointer data)
   GMainLoop *loop = data;
   (void) loop;
   g_error ("Timed out waiting for signal");
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static gboolean
@@ -88,7 +88,7 @@ exit_mainloop (gpointer data)
 {
   GMainLoop *loop = data;
   g_main_loop_quit (loop);
-  return FALSE;
+  return G_SOURCE_REMOVE;
 }
 
 static void