[glib] tests/closure: Use correct prototype for signal callback
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] tests/closure: Use correct prototype for signal callback
- Date: Mon, 22 Jul 2013 13:34:32 +0000 (UTC)
commit 00f5c63621d8a0e67562deaf529b6a9c9362e2d7
Author: Colin Walters <walters verbum org>
Date: Mon Jul 22 12:51:00 2013 +0100
tests/closure: Use correct prototype for signal callback
This test worked when compiled without optimization, but fails with
-O2. Presumably we just happened to find the GMainLoop off the stack
somewhere.
https://bugzilla.gnome.org/show_bug.cgi?id=704267
gobject/tests/closure.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gobject/tests/closure.c b/gobject/tests/closure.c
index 8ecb058..5f1a22c 100644
--- a/gobject/tests/closure.c
+++ b/gobject/tests/closure.c
@@ -169,6 +169,16 @@ send_usr1 (gpointer user_data)
return FALSE;
}
+static gboolean
+closure_quit_callback (gpointer user_data)
+{
+ GMainLoop *loop = user_data;
+
+ g_main_loop_quit (loop);
+
+ return TRUE;
+}
+
static void
test_closure_signal (void)
{
@@ -177,7 +187,7 @@ test_closure_signal (void)
g_idle_add_full (G_PRIORITY_LOW, send_usr1, NULL, NULL);
source = g_unix_signal_source_new (SIGUSR1);
- test_source (source, G_CALLBACK (fd_quit_callback));
+ test_source (source, G_CALLBACK (closure_quit_callback));
g_source_unref (source);
}
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]