mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 21:40:19 +00:00
pass only the signal_id to this function. it needs to relookup the signal
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org> * gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id to this function. it needs to relookup the signal multiple times. this fixes spurious segfaults that could show up with signal intensive code, when classes are created during a pending emission (which is normal case).
This commit is contained in:
parent
7702d2f8fc
commit
a3c7dca8cf
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -1,3 +1,11 @@
|
|||||||
|
Wed Jul 15 14:20:10 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gtk/gtksignal.c (gtk_signal_real_emit): pass only the signal_id
|
||||||
|
to this function. it needs to relookup the signal multiple times.
|
||||||
|
this fixes spurious segfaults that could show up with signal intensive
|
||||||
|
code, when classes are created during a pending emission (which is
|
||||||
|
normal case).
|
||||||
|
|
||||||
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
Tue Jul 14 19:12:12 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
* gtk/gtkbutton.c (gtk_button_set_arg): don't destroy a buttons
|
||||||
|
@ -130,7 +130,7 @@ static void gtk_signal_handler_unref (GtkHandler *handler,
|
|||||||
static void gtk_signal_handler_insert (GtkObject *object,
|
static void gtk_signal_handler_insert (GtkObject *object,
|
||||||
GtkHandler *handler);
|
GtkHandler *handler);
|
||||||
static void gtk_signal_real_emit (GtkObject *object,
|
static void gtk_signal_real_emit (GtkObject *object,
|
||||||
GtkSignal *signal,
|
guint signal_id,
|
||||||
GtkArg *params);
|
GtkArg *params);
|
||||||
static GtkHandler* gtk_signal_get_handlers (GtkObject *object,
|
static GtkHandler* gtk_signal_get_handlers (GtkObject *object,
|
||||||
guint signal_type);
|
guint signal_type);
|
||||||
@ -486,7 +486,7 @@ gtk_signal_emitv (GtkObject *object,
|
|||||||
if (signal->nparams > 0)
|
if (signal->nparams > 0)
|
||||||
g_return_if_fail (params != NULL);
|
g_return_if_fail (params != NULL);
|
||||||
|
|
||||||
gtk_signal_real_emit (object, signal, params);
|
gtk_signal_real_emit (object, signal_id, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -515,7 +515,7 @@ gtk_signal_emit (GtkObject *object,
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
if (!abort)
|
if (!abort)
|
||||||
gtk_signal_real_emit (object, signal, params);
|
gtk_signal_real_emit (object, signal_id, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -539,7 +539,7 @@ gtk_signal_emitv_by_name (GtkObject *object,
|
|||||||
g_return_if_fail (signal != NULL);
|
g_return_if_fail (signal != NULL);
|
||||||
g_return_if_fail (gtk_type_is_a (GTK_OBJECT_TYPE (object), signal->object_type));
|
g_return_if_fail (gtk_type_is_a (GTK_OBJECT_TYPE (object), signal->object_type));
|
||||||
|
|
||||||
gtk_signal_real_emit (object, signal, params);
|
gtk_signal_real_emit (object, signal_id, params);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -581,7 +581,7 @@ gtk_signal_emit_by_name (GtkObject *object,
|
|||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
if (!abort)
|
if (!abort)
|
||||||
gtk_signal_real_emit (object, signal, params);
|
gtk_signal_real_emit (object, signal_id, params);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1354,13 +1354,15 @@ static GtkObject *gtk_trace_signal_object = NULL;
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_signal_real_emit (GtkObject *object,
|
gtk_signal_real_emit (GtkObject *object,
|
||||||
GtkSignal *signal,
|
guint signal_id,
|
||||||
GtkArg *params)
|
GtkArg *params)
|
||||||
{
|
{
|
||||||
|
GtkSignal *signal;
|
||||||
GtkHandler *handlers;
|
GtkHandler *handlers;
|
||||||
GtkHandlerInfo info;
|
GtkHandlerInfo info;
|
||||||
guchar **signal_func_offset;
|
guchar **signal_func_offset;
|
||||||
register guint signal_id = signal->signal_id;
|
|
||||||
|
signal = LOOKUP_SIGNAL_ID (signal_id);
|
||||||
|
|
||||||
#ifdef G_ENABLE_DEBUG
|
#ifdef G_ENABLE_DEBUG
|
||||||
if (gtk_debug_flags & GTK_DEBUG_SIGNALS ||
|
if (gtk_debug_flags & GTK_DEBUG_SIGNALS ||
|
||||||
@ -1388,8 +1390,11 @@ gtk_signal_real_emit (GtkObject *object,
|
|||||||
signal_func_offset = (guchar**) ((guchar*) object->klass +
|
signal_func_offset = (guchar**) ((guchar*) object->klass +
|
||||||
signal->function_offset);
|
signal->function_offset);
|
||||||
if (*signal_func_offset)
|
if (*signal_func_offset)
|
||||||
(* signal->marshaller) (object, (GtkSignalFunc) *signal_func_offset,
|
{
|
||||||
NULL, params);
|
(* signal->marshaller) (object, (GtkSignalFunc) *signal_func_offset,
|
||||||
|
NULL, params);
|
||||||
|
signal = LOOKUP_SIGNAL_ID (signal_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GTK_OBJECT_CONNECTED (object))
|
if (GTK_OBJECT_CONNECTED (object))
|
||||||
@ -1397,6 +1402,8 @@ gtk_signal_real_emit (GtkObject *object,
|
|||||||
handlers = gtk_signal_get_handlers (object, signal_id);
|
handlers = gtk_signal_get_handlers (object, signal_id);
|
||||||
if (handlers)
|
if (handlers)
|
||||||
{
|
{
|
||||||
|
gint return_val;
|
||||||
|
|
||||||
info.object = object;
|
info.object = object;
|
||||||
info.marshaller = signal->marshaller;
|
info.marshaller = signal->marshaller;
|
||||||
info.params = params;
|
info.params = params;
|
||||||
@ -1406,7 +1413,9 @@ gtk_signal_real_emit (GtkObject *object,
|
|||||||
info.signal_flags = signal->signal_flags;
|
info.signal_flags = signal->signal_flags;
|
||||||
info.signal_id = signal_id;
|
info.signal_id = signal_id;
|
||||||
|
|
||||||
switch (gtk_handlers_run (handlers, &info, FALSE))
|
return_val = gtk_handlers_run (handlers, &info, FALSE);
|
||||||
|
signal = LOOKUP_SIGNAL_ID (signal_id);
|
||||||
|
switch (return_val)
|
||||||
{
|
{
|
||||||
case EMISSION_CONTINUE:
|
case EMISSION_CONTINUE:
|
||||||
break;
|
break;
|
||||||
@ -1427,8 +1436,11 @@ gtk_signal_real_emit (GtkObject *object,
|
|||||||
signal_func_offset = (guchar**) ((guchar*) object->klass +
|
signal_func_offset = (guchar**) ((guchar*) object->klass +
|
||||||
signal->function_offset);
|
signal->function_offset);
|
||||||
if (*signal_func_offset)
|
if (*signal_func_offset)
|
||||||
(* signal->marshaller) (object, (GtkSignalFunc) *signal_func_offset,
|
{
|
||||||
NULL, params);
|
(* signal->marshaller) (object, (GtkSignalFunc) *signal_func_offset,
|
||||||
|
NULL, params);
|
||||||
|
signal = LOOKUP_SIGNAL_ID (signal_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GTK_OBJECT_CONNECTED (object))
|
if (GTK_OBJECT_CONNECTED (object))
|
||||||
@ -1436,6 +1448,8 @@ gtk_signal_real_emit (GtkObject *object,
|
|||||||
handlers = gtk_signal_get_handlers (object, signal_id);
|
handlers = gtk_signal_get_handlers (object, signal_id);
|
||||||
if (handlers)
|
if (handlers)
|
||||||
{
|
{
|
||||||
|
gint return_val;
|
||||||
|
|
||||||
if (!info.object)
|
if (!info.object)
|
||||||
{
|
{
|
||||||
info.object = object;
|
info.object = object;
|
||||||
@ -1447,7 +1461,9 @@ gtk_signal_real_emit (GtkObject *object,
|
|||||||
info.signal_flags = signal->signal_flags;
|
info.signal_flags = signal->signal_flags;
|
||||||
info.signal_id = signal_id;
|
info.signal_id = signal_id;
|
||||||
}
|
}
|
||||||
switch (gtk_handlers_run (handlers, &info, TRUE))
|
return_val = gtk_handlers_run (handlers, &info, TRUE);
|
||||||
|
signal = LOOKUP_SIGNAL_ID (signal_id);
|
||||||
|
switch (return_val)
|
||||||
{
|
{
|
||||||
case EMISSION_CONTINUE:
|
case EMISSION_CONTINUE:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user