diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-10-04 10:14:35 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2011-10-15 17:59:35 -0400 |
commit | 5dcc502f914db3b57599e6740345b46292a979a4 (patch) | |
tree | 49201bfa87011ac21ffe0f826d120f22515b6379 /gobject | |
parent | 33a86fce6a157ec7a69fe21a157b27748cb286eb (diff) |
Document that types are limited to 64 KiB
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=659916
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'gobject')
-rw-r--r-- | gobject/gtype.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gobject/gtype.c b/gobject/gtype.c index 748bd9b07..3d79f7bf0 100644 --- a/gobject/gtype.c +++ b/gobject/gtype.c @@ -65,6 +65,13 @@ * structure and a #GTypeFundamentalInfo structure but it is seldom used * since most fundamental types are predefined rather than user-defined. * + * Type instance and class structs are limited to a total of 64 KiB, + * including all parent types. Similarly, type instances' private data + * (as created by g_type_class_add_private()) are limited to a total of + * 64 KiB. If a type instance needs a large static buffer, allocate it + * separately (typically by using #GArray or #GPtrArray) and put a pointer + * to the buffer in the structure. + * * A final word about type names. * Such an identifier needs to be at least three characters long. There is no * upper length limit. The first character needs to be a letter (a-z or A-Z) @@ -4392,7 +4399,7 @@ g_type_init (void) * structures. * * Note that the accumulated size of the private structures of - * a type and all its parent types cannot excced 64kB. + * a type and all its parent types cannot excced 64 KiB. * * This function should be called in the type's class_init() function. * The private structure can be retrieved using the |