[glib] Document that types are limited to 64 KiB
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Document that types are limited to 64 KiB
- Date: Sat, 15 Oct 2011 22:01:20 +0000 (UTC)
commit 5dcc502f914db3b57599e6740345b46292a979a4
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Tue Oct 4 10:14:35 2011 +0100
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>
gobject/gtype.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 748bd9b..3d79f7b 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]