[glib/glib-2-30] GType tutorial: clarify class struct initialisation



commit 5f64e739900143ecb29fe9f34339542d0bca53a9
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Sep 11 15:44:39 2011 -0400

    GType tutorial: clarify class struct initialisation
    
    Make the information on how the class structure is initialised less
    confusing to first-time readers.

 docs/reference/gobject/tut_gtype.xml |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml
index f040366..2745fd7 100644
--- a/docs/reference/gobject/tut_gtype.xml
+++ b/docs/reference/gobject/tut_gtype.xml
@@ -533,10 +533,11 @@ void           g_type_free_instance   (GTypeInstance *instance);
           </para>
 
           <para>
-            If this is the first instance of the object ever created, the type system must create
-            a class structure: it allocates a buffer to hold the object's class structure and
-            initializes it. It first copies the parent's class structure over this structure
-            (if there is no parent, it initializes it to zero). It then invokes the 
+            If this is the first instance of the object ever created, the type system must create a class structure.
+            It allocates a buffer to hold the object's class structure and initializes it. The first part of the
+            class structure (ie: the embedded parent class structure) is initialized by copying the contents from
+            the class structure of the parent class. The rest of class structure is initialized to zero.  If there
+            is no parent, the entire class structure is initialized to zero. The type system then invokes the
             base_class_initialization functions (<link linkend="GBaseInitFunc"><type>GBaseInitFunc</type></link>) from topmost 
             fundamental object to bottom-most most derived object. The object's class_init 
             (<link linkend="GClassInitFunc"><type>GClassInitFunc</type></link>) function is invoked afterwards to complete



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]