relookup type node after class creation and parent class' object
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org> * gtk/gtktypeutils.c (gtk_type_new): relookup type node after class creation and parent class' object initializer.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -1,3 +1,8 @@
|
||||
Mon Nov 16 00:17:53 1998 Tim Janik <timj@gtk.org>
|
||||
|
||||
* gtk/gtktypeutils.c (gtk_type_new): relookup type node after
|
||||
class creation and parent class' object initializer.
|
||||
|
||||
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||
|
||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||
|
@ -331,19 +331,20 @@ gtk_type_new (GtkType type)
|
||||
GtkTypeNode *node;
|
||||
GtkTypeObject *tobject;
|
||||
gpointer klass;
|
||||
guint i;
|
||||
|
||||
LOOKUP_TYPE_NODE (node, type);
|
||||
g_return_val_if_fail (node != NULL, NULL);
|
||||
|
||||
klass = node->klass;
|
||||
if (!klass)
|
||||
{
|
||||
klass = gtk_type_class (type);
|
||||
LOOKUP_TYPE_NODE (node, type);
|
||||
}
|
||||
node->chunk_alloc_locked = TRUE;
|
||||
|
||||
if (node->mem_chunk)
|
||||
{
|
||||
tobject = g_mem_chunk_alloc (node->mem_chunk);
|
||||
memset (tobject, 0, node->type_info.object_size);
|
||||
}
|
||||
tobject = g_mem_chunk_alloc0 (node->mem_chunk);
|
||||
else
|
||||
tobject = g_malloc0 (node->type_info.object_size);
|
||||
|
||||
@ -352,17 +353,25 @@ gtk_type_new (GtkType type)
|
||||
* corresponding base class, otherwise overridden class functions
|
||||
* could get called with partly-initialized objects.
|
||||
*/
|
||||
if (node->n_supers)
|
||||
{
|
||||
guint i;
|
||||
GtkType *supers;
|
||||
|
||||
supers = node->supers;
|
||||
for (i = node->n_supers; i > 0; i--)
|
||||
{
|
||||
GtkTypeNode *pnode;
|
||||
|
||||
LOOKUP_TYPE_NODE (pnode, node->supers[i]);
|
||||
LOOKUP_TYPE_NODE (pnode, supers[i]);
|
||||
if (pnode->type_info.object_init_func)
|
||||
{
|
||||
tobject->klass = pnode->klass;
|
||||
pnode->type_info.object_init_func (tobject);
|
||||
}
|
||||
}
|
||||
LOOKUP_TYPE_NODE (node, type);
|
||||
}
|
||||
tobject->klass = klass;
|
||||
if (node->type_info.object_init_func)
|
||||
node->type_info.object_init_func (tobject);
|
||||
|
Reference in New Issue
Block a user