aboutsummaryrefslogtreecommitdiff
path: root/libobjc
diff options
context:
space:
mode:
authorDavid Ayers <d.ayers@inode.at>2005-12-15 17:46:17 +0100
committerDavid Ayers <ayers@gcc.gnu.org>2005-12-15 16:46:17 +0000
commitbf5b295c6ae0da86f24a4646d0552d3b5ce8bbb3 (patch)
tree16c60e929c53e436e23b2c78fdaee6226742efbe /libobjc
parente6add59b161628111dff015502f88d6459927493 (diff)
downloadgcc-bf5b295c6ae0da86f24a4646d0552d3b5ce8bbb3.zip
gcc-bf5b295c6ae0da86f24a4646d0552d3b5ce8bbb3.tar.gz
gcc-bf5b295c6ae0da86f24a4646d0552d3b5ce8bbb3.tar.bz2
re PR libobjc/14382 ([libobjc] Calling +initialize on a per category basis)
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: r108584
Diffstat (limited to 'libobjc')
-rw-r--r--libobjc/ChangeLog6
-rw-r--r--libobjc/README25
2 files changed, 22 insertions, 9 deletions
diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog
index 8273db8..3ac957d 100644
--- a/libobjc/ChangeLog
+++ b/libobjc/ChangeLog
@@ -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-12-12 Andrew Pinski <pinskia@physics.uc.edu>
* encoding.c (TYPE_FIELDS): Fix to skip over just _C_STRUCT_B and
diff --git a/libobjc/README b/libobjc/README
index f478d67..093116f 100644
--- a/libobjc/README
+++ b/libobjc/README
@@ -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