mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
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
This commit is contained in:
parent
6b865d5312
commit
256561db2f
@ -26,14 +26,14 @@
|
|||||||
#include <gdk/gdkkeysyms.h>
|
#include <gdk/gdkkeysyms.h>
|
||||||
|
|
||||||
/* exported for GtkBuilder */
|
/* exported for GtkBuilder */
|
||||||
void signal_normal (GtkWindow *window, GParamSpec spec);
|
void signal_normal (GtkWindow *window, GParamSpec *spec);
|
||||||
void signal_after (GtkWindow *window, GParamSpec spec);
|
void signal_after (GtkWindow *window, GParamSpec *spec);
|
||||||
void signal_object (GtkButton *button, GParamSpec spec);
|
void signal_object (GtkButton *button, GParamSpec *spec);
|
||||||
void signal_object_after (GtkButton *button, GParamSpec spec);
|
void signal_object_after (GtkButton *button, GParamSpec *spec);
|
||||||
void signal_first (GtkButton *button, GParamSpec spec);
|
void signal_first (GtkButton *button, GParamSpec *spec);
|
||||||
void signal_second (GtkButton *button, GParamSpec spec);
|
void signal_second (GtkButton *button, GParamSpec *spec);
|
||||||
void signal_extra (GtkButton *button, GParamSpec spec);
|
void signal_extra (GtkButton *button, GParamSpec *spec);
|
||||||
void signal_extra2 (GtkButton *button, GParamSpec spec);
|
void signal_extra2 (GtkButton *button, GParamSpec *spec);
|
||||||
|
|
||||||
/* Copied from gtkiconfactory.c; keep in sync! */
|
/* Copied from gtkiconfactory.c; keep in sync! */
|
||||||
struct _GtkIconSet
|
struct _GtkIconSet
|
||||||
@ -140,7 +140,7 @@ static int object = 0;
|
|||||||
static int object_after = 0;
|
static int object_after = 0;
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_normal (GtkWindow *window, GParamSpec spec)
|
signal_normal (GtkWindow *window, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (GTK_IS_WINDOW (window));
|
g_assert (GTK_IS_WINDOW (window));
|
||||||
g_assert (normal == 0);
|
g_assert (normal == 0);
|
||||||
@ -150,7 +150,7 @@ signal_normal (GtkWindow *window, GParamSpec spec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_after (GtkWindow *window, GParamSpec spec)
|
signal_after (GtkWindow *window, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (GTK_IS_WINDOW (window));
|
g_assert (GTK_IS_WINDOW (window));
|
||||||
g_assert (normal == 1);
|
g_assert (normal == 1);
|
||||||
@ -160,7 +160,7 @@ signal_after (GtkWindow *window, GParamSpec spec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_object (GtkButton *button, GParamSpec spec)
|
signal_object (GtkButton *button, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (GTK_IS_BUTTON (button));
|
g_assert (GTK_IS_BUTTON (button));
|
||||||
g_assert (object == 0);
|
g_assert (object == 0);
|
||||||
@ -170,7 +170,7 @@ signal_object (GtkButton *button, GParamSpec spec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
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 (GTK_IS_BUTTON (button));
|
||||||
g_assert (object == 1);
|
g_assert (object == 1);
|
||||||
@ -180,28 +180,28 @@ signal_object_after (GtkButton *button, GParamSpec spec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_first (GtkButton *button, GParamSpec spec)
|
signal_first (GtkButton *button, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (normal == 0);
|
g_assert (normal == 0);
|
||||||
normal = 10;
|
normal = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_second (GtkButton *button, GParamSpec spec)
|
signal_second (GtkButton *button, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (normal == 10);
|
g_assert (normal == 10);
|
||||||
normal = 20;
|
normal = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_extra (GtkButton *button, GParamSpec spec)
|
signal_extra (GtkButton *button, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (normal == 20);
|
g_assert (normal == 20);
|
||||||
normal = 30;
|
normal = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
void /* exported for GtkBuilder */
|
void /* exported for GtkBuilder */
|
||||||
signal_extra2 (GtkButton *button, GParamSpec spec)
|
signal_extra2 (GtkButton *button, GParamSpec *spec)
|
||||||
{
|
{
|
||||||
g_assert (normal == 30);
|
g_assert (normal == 30);
|
||||||
normal = 40;
|
normal = 40;
|
||||||
|
Loading…
Reference in New Issue
Block a user