explain that G_TYPE_INSTANCE_GET_CLASS() does behave different during
[platform/upstream/glib.git] / docs / reference / gobject / tmpl / gtype.sgml
index 1688e62..9ca599c 100644 (file)
@@ -221,7 +221,7 @@ across invocation of g_type_register_static().
   function for interface types. (optional)
 @class_data:    User-supplied data passed to the class init/finalize functions.
 @instance_size:  Size of the instance (object) structure (required for instantiatable types only).
-@n_preallocs:   Number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching).
+@n_preallocs:   Prior to GLib 2.10, it specified the number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). Since GLib 2.10, it is ignored, since instances are allocated with the <link linkend="glib-Memory-Slices">slice allocator</link> now.
 @instance_init:  Location of the instance initialization function (optional, for instantiatable types only).
 @value_table:   A #GTypeValueTable function table for generic handling of GValues of this type (usually only
                 useful for fundamental types).
@@ -470,9 +470,13 @@ This macro should only be used in type implementations.
 <!-- ##### MACRO G_TYPE_INSTANCE_GET_CLASS ##### -->
 <para>
 Returns the class structure of a given @instance, casted
-to a specified anchestor type @g_type of the instance.
-<para>
+to a specified ancestor type @g_type of the instance.
 </para>
+<warning><para>Note
+that while calling a GInstanceInitFunc(), the class pointer gets
+modified, so it might not always return the expected pointer.
+</para></warning>
+<para>
 This macro should only be used in type implementations.
 </para>