]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libobjc/14382 ([libobjc] Calling +initialize on a per category basis)
authorDavid Ayers <d.ayers@inode.at>
Thu, 15 Dec 2005 18:23:40 +0000 (19:23 +0100)
committerDavid Ayers <ayers@gcc.gnu.org>
Thu, 15 Dec 2005 18:23:40 +0000 (18:23 +0000)
2005-12-15  David Ayers  <d.ayers@inode.at>

PR libobjc/14382
* README (+load,+initialize): Fix documentation to reflect
intended and implemented semantics for +load and +initialize.

From-SVN: r108589

libobjc/ChangeLog
libobjc/README

index c2cc06123856c2f99e84949398b7adbb0a034c55..f1feba07beb0ffbf5b2ac8d4cd471289ef5251c9 100644 (file)
@@ -1,3 +1,9 @@
+2005-12-15  David Ayers  <d.ayers@inode.at>
+
+       PR libobjc/14382
+       * README (+load,+initialize): Fix documentation to reflect
+       intended and implemented semantics for +load and +initialize.
+       
 2005-11-30  Release Manager
 
        * GCC 3.4.5 released.
index f478d67dec8fa6c2403330214468a09025e28e47..093116fd594eb4e95deab220368cfc7fd1c59304 100644 (file)
@@ -39,19 +39,26 @@ adopts it -- it is not enough to inherit them.  The flag
 `-Wprotocols' is the default which requires them defined.
 
 
++load
+===========
+This method, if defined, is called for each class and category
+implementation when the class is loaded into the runtime.  This method
+is not inherited, and is thus not called for a subclass that doesn't
+define it itself.  Thus, each +load method is called exactly once by
+the runtime.  The runtime invocation of this method is thread safe.
+
+
 +initialize 
 ===========
 
 This method, if defined, is called before any other instance or class
-methods of that particular class.  This method is not inherited, and
-is thus not called as initializer for a subclass that doesn't define
-it itself.  Thus, each +initialize method is called exactly once (or
-never if no methods of that particular class is never called).
-Besides this, it is allowed to have several +initialize methods, one
-for each category.  The order in which these (multiple methods) are
-called is not well defined.  I am not completely certain what the
-semantics of this method is for other implementations, but this is
-how it works for GNU Objective C.
+methods of that particular class.  For the GNU runtime, this method is 
+not inherited, and is thus not called as initializer for a subclass that 
+doesn't define it itself.  Thus, each +initialize method is called exactly 
+once by the runtime (or never if no methods of that particular class is 
+never called).  It is wise to guard against multiple invocations anyway 
+to remain portable with the NeXT runtime.  The runtime invocation of 
+this method is thread safe.
 
 
 Passivation/Activation/Typedstreams