summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2014-01-07 13:55:28 +0100
committerSebastien Bacher <seb128@ubuntu.com>2014-01-08 10:43:52 +0100
commit256561db2f0b34e01047f8882b3e0cb8c6d9dbab (patch)
tree59ec415b03bf48908107afcfc63e67f167265762 /testsuite
parent6b865d53123c85f9d02b5a091435327a4dd7e464 (diff)
downloadgtk+-256561db2f0b34e01047f8882b3e0cb8c6d9dbab.tar.gz
fix prototypes of signal callbacks in the test suite
The signal callbacks are defined to take pointers as their arguments, but the callbacks found in testsuite/gtk/builder.c are passing a GParamSpec by value as the second argument. This confuses and angers the compiler on ppc64el, resulting in segfaults after return from the function due to stack-smashing by the (completely-unused) argument. https://bugzilla.gnome.org/show_bug.cgi?id=721700
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gtk/builder.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c
index d20fba6a61..86c5e56c15 100644
--- a/testsuite/gtk/builder.c
+++ b/testsuite/gtk/builder.c
@@ -26,14 +26,14 @@
#include <gdk/gdkkeysyms.h>
/* exported for GtkBuilder */
-void signal_normal (GtkWindow *window, GParamSpec spec);
-void signal_after (GtkWindow *window, GParamSpec spec);
-void signal_object (GtkButton *button, GParamSpec spec);
-void signal_object_after (GtkButton *button, GParamSpec spec);
-void signal_first (GtkButton *button, GParamSpec spec);
-void signal_second (GtkButton *button, GParamSpec spec);
-void signal_extra (GtkButton *button, GParamSpec spec);
-void signal_extra2 (GtkButton *button, GParamSpec spec);
+void signal_normal (GtkWindow *window, GParamSpec *spec);
+void signal_after (GtkWindow *window, GParamSpec *spec);
+void signal_object (GtkButton *button, GParamSpec *spec);
+void signal_object_after (GtkButton *button, GParamSpec *spec);
+void signal_first (GtkButton *button, GParamSpec *spec);
+void signal_second (GtkButton *button, GParamSpec *spec);
+void signal_extra (GtkButton *button, GParamSpec *spec);
+void signal_extra2 (GtkButton *button, GParamSpec *spec);
/* Copied from gtkiconfactory.c; keep in sync! */
struct _GtkIconSet
@@ -140,7 +140,7 @@ static int object = 0;
static int object_after = 0;
void /* exported for GtkBuilder */
-signal_normal (GtkWindow *window, GParamSpec spec)
+signal_normal (GtkWindow *window, GParamSpec *spec)
{
g_assert (GTK_IS_WINDOW (window));
g_assert (normal == 0);
@@ -150,7 +150,7 @@ signal_normal (GtkWindow *window, GParamSpec spec)
}
void /* exported for GtkBuilder */
-signal_after (GtkWindow *window, GParamSpec spec)
+signal_after (GtkWindow *window, GParamSpec *spec)
{
g_assert (GTK_IS_WINDOW (window));
g_assert (normal == 1);
@@ -160,7 +160,7 @@ signal_after (GtkWindow *window, GParamSpec spec)
}
void /* exported for GtkBuilder */
-signal_object (GtkButton *button, GParamSpec spec)
+signal_object (GtkButton *button, GParamSpec *spec)
{
g_assert (GTK_IS_BUTTON (button));
g_assert (object == 0);
@@ -170,7 +170,7 @@ signal_object (GtkButton *button, GParamSpec spec)
}
void /* exported for GtkBuilder */
-signal_object_after (GtkButton *button, GParamSpec spec)
+signal_object_after (GtkButton *button, GParamSpec *spec)
{
g_assert (GTK_IS_BUTTON (button));
g_assert (object == 1);
@@ -180,28 +180,28 @@ signal_object_after (GtkButton *button, GParamSpec spec)
}
void /* exported for GtkBuilder */
-signal_first (GtkButton *button, GParamSpec spec)
+signal_first (GtkButton *button, GParamSpec *spec)
{
g_assert (normal == 0);
normal = 10;
}
void /* exported for GtkBuilder */
-signal_second (GtkButton *button, GParamSpec spec)
+signal_second (GtkButton *button, GParamSpec *spec)
{
g_assert (normal == 10);
normal = 20;
}
void /* exported for GtkBuilder */
-signal_extra (GtkButton *button, GParamSpec spec)
+signal_extra (GtkButton *button, GParamSpec *spec)
{
g_assert (normal == 20);
normal = 30;
}
void /* exported for GtkBuilder */
-signal_extra2 (GtkButton *button, GParamSpec spec)
+signal_extra2 (GtkButton *button, GParamSpec *spec)
{
g_assert (normal == 30);
normal = 40;