mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-16 02:00:02 +08:00
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
This commit is contained in:
parent
e6add59b16
commit
bf5b295c6a
@ -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>
|
2005-12-12 Andrew Pinski <pinskia@physics.uc.edu>
|
||||||
|
|
||||||
* encoding.c (TYPE_FIELDS): Fix to skip over just _C_STRUCT_B and
|
* encoding.c (TYPE_FIELDS): Fix to skip over just _C_STRUCT_B and
|
||||||
|
@ -39,19 +39,26 @@ adopts it -- it is not enough to inherit them. The flag
|
|||||||
`-Wprotocols' is the default which requires them defined.
|
`-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
|
+initialize
|
||||||
===========
|
===========
|
||||||
|
|
||||||
This method, if defined, is called before any other instance or class
|
This method, if defined, is called before any other instance or class
|
||||||
methods of that particular class. This method is not inherited, and
|
methods of that particular class. For the GNU runtime, this method is
|
||||||
is thus not called as initializer for a subclass that doesn't define
|
not inherited, and is thus not called as initializer for a subclass that
|
||||||
it itself. Thus, each +initialize method is called exactly once (or
|
doesn't define it itself. Thus, each +initialize method is called exactly
|
||||||
never if no methods of that particular class is never called).
|
once by the runtime (or never if no methods of that particular class is
|
||||||
Besides this, it is allowed to have several +initialize methods, one
|
never called). It is wise to guard against multiple invocations anyway
|
||||||
for each category. The order in which these (multiple methods) are
|
to remain portable with the NeXT runtime. The runtime invocation of
|
||||||
called is not well defined. I am not completely certain what the
|
this method is thread safe.
|
||||||
semantics of this method is for other implementations, but this is
|
|
||||||
how it works for GNU Objective C.
|
|
||||||
|
|
||||||
|
|
||||||
Passivation/Activation/Typedstreams
|
Passivation/Activation/Typedstreams
|
||||||
|
Loading…
Reference in New Issue
Block a user