gtype: Bump allowed number of children
authorGarrett Regier <garrett.regier@riftio.com>
Wed, 15 Apr 2015 03:44:38 +0000 (20:44 -0700)
committerGarrett Regier <garrettregier@gmail.com>
Tue, 12 May 2015 12:30:46 +0000 (05:30 -0700)
Restricting the number of children to be less than 4095 can
be an issue when generating types. This is also an issue for
the Lua bindings as each Lua state will create a new GType each
time the Lua code is executed.

https://bugzilla.gnome.org/show_bug.cgi?id=747882

gobject/gtype.c

index dc58524..4e6f77d 100644 (file)
@@ -250,7 +250,7 @@ struct _TypeNode
 
 #define SIZEOF_BASE_TYPE_NODE()                        (G_STRUCT_OFFSET (TypeNode, supers))
 #define MAX_N_SUPERS                           (255)
-#define MAX_N_CHILDREN                         (4095)
+#define MAX_N_CHILDREN                         (G_MAXUINT)
 #define        MAX_N_INTERFACES                        (255) /* Limited by offsets being 8 bits */
 #define        MAX_N_PREREQUISITES                     (511)
 #define NODE_TYPE(node)                                (node->supers[0])