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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* 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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* 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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* 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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* 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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* 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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* 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>
|
1998-11-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
* gtk/gtkpaned.c (gtk_paned_realize): Destroy the cursor after we
|
||||||
|
@ -331,19 +331,20 @@ gtk_type_new (GtkType type)
|
|||||||
GtkTypeNode *node;
|
GtkTypeNode *node;
|
||||||
GtkTypeObject *tobject;
|
GtkTypeObject *tobject;
|
||||||
gpointer klass;
|
gpointer klass;
|
||||||
guint i;
|
|
||||||
|
|
||||||
LOOKUP_TYPE_NODE (node, type);
|
LOOKUP_TYPE_NODE (node, type);
|
||||||
g_return_val_if_fail (node != NULL, NULL);
|
g_return_val_if_fail (node != NULL, NULL);
|
||||||
|
|
||||||
klass = gtk_type_class (type);
|
klass = node->klass;
|
||||||
|
if (!klass)
|
||||||
|
{
|
||||||
|
klass = gtk_type_class (type);
|
||||||
|
LOOKUP_TYPE_NODE (node, type);
|
||||||
|
}
|
||||||
node->chunk_alloc_locked = TRUE;
|
node->chunk_alloc_locked = TRUE;
|
||||||
|
|
||||||
if (node->mem_chunk)
|
if (node->mem_chunk)
|
||||||
{
|
tobject = g_mem_chunk_alloc0 (node->mem_chunk);
|
||||||
tobject = g_mem_chunk_alloc (node->mem_chunk);
|
|
||||||
memset (tobject, 0, node->type_info.object_size);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
tobject = g_malloc0 (node->type_info.object_size);
|
tobject = g_malloc0 (node->type_info.object_size);
|
||||||
|
|
||||||
@ -352,16 +353,24 @@ gtk_type_new (GtkType type)
|
|||||||
* corresponding base class, otherwise overridden class functions
|
* corresponding base class, otherwise overridden class functions
|
||||||
* could get called with partly-initialized objects.
|
* could get called with partly-initialized objects.
|
||||||
*/
|
*/
|
||||||
for (i = node->n_supers; i > 0; i--)
|
if (node->n_supers)
|
||||||
{
|
{
|
||||||
GtkTypeNode *pnode;
|
guint i;
|
||||||
|
GtkType *supers;
|
||||||
LOOKUP_TYPE_NODE (pnode, node->supers[i]);
|
|
||||||
if (pnode->type_info.object_init_func)
|
supers = node->supers;
|
||||||
|
for (i = node->n_supers; i > 0; i--)
|
||||||
{
|
{
|
||||||
tobject->klass = pnode->klass;
|
GtkTypeNode *pnode;
|
||||||
pnode->type_info.object_init_func (tobject);
|
|
||||||
|
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;
|
tobject->klass = klass;
|
||||||
if (node->type_info.object_init_func)
|
if (node->type_info.object_init_func)
|
||||||
|
Reference in New Issue
Block a user