diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-10-17 11:01:31 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-10-17 11:01:31 +0000 |
commit | 1501d0941a5d845d923b30c6199ce0f8b792bdc8 (patch) | |
tree | 013659d5354d68e2fe8c2c1e6e3d02449f4adf4b /libobjc/init.c | |
parent | 368be4c7351ae32340d6ef1fbf330467792c1432 (diff) | |
download | gcc-1501d0941a5d845d923b30c6199ce0f8b792bdc8.zip gcc-1501d0941a5d845d923b30c6199ce0f8b792bdc8.tar.gz gcc-1501d0941a5d845d923b30c6199ce0f8b792bdc8.tar.bz2 |
In libobjc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
* init.c (objc_send_load): Do not wait for NXConstantString to be
registered before executing +load. There is no point if
-fconstant-string-class=xxx is used when compiling all modules,
as is the case for almost all users.
* linking.m (__objc_linking): Do not try to forcefully link in
NXConstantString.
In gcc/:
2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
* doc/objc.texi (What you can and what you cannot do in +load):
Document that sending messages to constant string objects in +load
is not guaranteed to work.
From-SVN: r165583
Diffstat (limited to 'libobjc/init.c')
-rw-r--r-- | libobjc/init.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libobjc/init.c b/libobjc/init.c index dd8789c..d87a587 100644 --- a/libobjc/init.c +++ b/libobjc/init.c @@ -444,8 +444,7 @@ class_is_subclass_of_class (Class class, Class superclass) their superclasses are not yet known to the runtime. */ static struct objc_list *unresolved_classes = 0; -/* Extern function used to reference the Object and NXConstantString - classes. */ +/* Extern function used to reference the Object class. */ extern void __objc_force_linking (void); @@ -755,11 +754,9 @@ objc_send_load (void) return; } - /* Special check to allow creating and sending messages to constant - strings in +load methods. If these classes are not yet known, - even if all the other classes are known, delay sending of +load. */ - if (! objc_lookup_class ("NXConstantString") || - ! objc_lookup_class ("Object")) + /* Special check. If 'Object', which is used by meta-classes, has + not been loaded yet, delay sending of +load. */ + if (! objc_lookup_class ("Object")) return; /* Iterate over all modules in the __objc_module_list and call on |