forked from AuroraMiddleware/gtk
reallocate the required memory block, rather than allocating it newly from
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org> * gtk/gtkobject.c (gtk_object_class_add_signals): reallocate the required memory block, rather than allocating it newly from scratch and doing a full-blown block copy on it.
This commit is contained in:
parent
4721a7dd40
commit
dcc8bc33db
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -1,3 +1,9 @@
|
||||
Mon Sep 21 07:44:30 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtkobject.c (gtk_object_class_add_signals): reallocate
|
||||
the required memory block, rather than allocating it newly from
|
||||
scratch and doing a full-blown block copy on it.
|
||||
|
||||
Mon Sep 21 02:30:06 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS file update for upcoming release of Gtk+ version 1.1.2,
|
||||
|
@ -127,7 +127,7 @@ gtk_object_get_type (void)
|
||||
static void
|
||||
gtk_object_base_class_init (GtkObjectClass *class)
|
||||
{
|
||||
/* reset instance specific fields that don't get inhrited */
|
||||
/* reset instance specific fields that don't get inherited */
|
||||
class->signals = NULL;
|
||||
class->nsignals = 0;
|
||||
class->n_args = 0;
|
||||
@ -327,19 +327,13 @@ gtk_object_class_add_signals (GtkObjectClass *class,
|
||||
guint *signals,
|
||||
guint nsignals)
|
||||
{
|
||||
guint *new_signals;
|
||||
guint i;
|
||||
|
||||
g_return_if_fail (class != NULL);
|
||||
|
||||
new_signals = g_new (guint, class->nsignals + nsignals);
|
||||
for (i = 0; i < class->nsignals; i++)
|
||||
new_signals[i] = class->signals[i];
|
||||
for (i = 0; i < nsignals; i++)
|
||||
new_signals[class->nsignals + i] = signals[i];
|
||||
|
||||
g_free (class->signals);
|
||||
class->signals = new_signals;
|
||||
g_return_if_fail (GTK_IS_OBJECT_CLASS (class));
|
||||
if (!nsignals)
|
||||
return;
|
||||
g_return_if_fail (signals != NULL);
|
||||
|
||||
class->signals = g_renew (guint, class->signals, class->nsignals + nsignals);
|
||||
memcpy (class->signals + class->nsignals, signals, nsignals * sizeof (guint));
|
||||
class->nsignals += nsignals;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user