[glib] Use G_SOURCE_CONTINUE/REMOVE internally
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Use G_SOURCE_CONTINUE/REMOVE internally
- Date: Wed, 25 Jan 2012 21:24:23 +0000 (UTC)
commit ef159af00f723f46658f46af03ea67185dae9988
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 25 08:53:05 2012 -0500
Use G_SOURCE_CONTINUE/REMOVE internally
Now that we have these macros, we should use them.
This commit covers everything in glib/.
glib/gmain.c | 2 +-
glib/tests/mainloop.c | 2 +-
glib/tests/spawn-multithreaded.c | 2 +-
glib/tests/spawn-singlethread.c | 2 +-
glib/tests/timeout.c | 4 +++-
glib/tests/unix.c | 6 +++---
6 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/glib/gmain.c b/glib/gmain.c
index 4a79cb9..b1e3eee 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2358,7 +2358,7 @@ g_main_current_source (void)
* self->idle_id = 0;
* GDK_THREADS_LEAVE (<!-- -->);
*
- * return FALSE;
+ * return G_SOURCE_REMOVE;
* }
*
* static void
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index 980f7f5..7372f97 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -219,7 +219,7 @@ call_func (gpointer data)
{
func (g_thread_self ());
- return FALSE;
+ return G_SOURCE_REMOVE;
}
static gpointer
diff --git a/glib/tests/spawn-multithreaded.c b/glib/tests/spawn-multithreaded.c
index 534766b..3f632f4 100644
--- a/glib/tests/spawn-multithreaded.c
+++ b/glib/tests/spawn-multithreaded.c
@@ -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
diff --git a/glib/tests/spawn-singlethread.c b/glib/tests/spawn-singlethread.c
index f29ecb8..42d88e6 100644
--- a/glib/tests/spawn-singlethread.c
+++ b/glib/tests/spawn-singlethread.c
@@ -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
diff --git a/glib/tests/timeout.c b/glib/tests/timeout.c
index 88d5ffe..2d78723 100644
--- a/glib/tests/timeout.c
+++ b/glib/tests/timeout.c
@@ -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
diff --git a/glib/tests/unix.c b/glib/tests/unix.c
index feb2bb4..77ee61e 100644
--- a/glib/tests/unix.c
+++ b/glib/tests/unix.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]