GNOME Bugzilla – Bug 747882
gtype: Bump allowed number of children
Last modified: 2015-05-12 12:33:14 UTC
GType currently restricts the number of children to be less than 4095, this is an issue when generating types. This can also be an issue for the Lua bindings as each Lua state will create a new GType each time the Lua is executed.
Created attachment 301587 [details] [review] gtype: Bump allowed number of children Bumps it to G_MAXUINT, the field is a guint.
Review of attachment 301587 [details] [review]: If you look at the bitfield in the TypeNode struct, this was obviously meant to be guint n_children : 12, because then the bitfield would add up to exactly 32. Not sure there's anything to do now, other than bump the limit...
I could rework the patch to bump the limit less excessively and spread the extra bits to n_supers and n_prerequisites. Would that be preferred?
https://git.gnome.org/browse/glib/commit/?id=ec79146572aece95c7bc032b486e6a57015ee6e4 is the commit that took out the :12
OK, so cannot reduce the number of bits for this field. May I push this patch?
Review of attachment 301587 [details] [review]: Looks fine considering the patch from Benjamin in 2009.