Conditionally compile weak attribute.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29159 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2009-12-22 22:12:56 +00:00
parent fffe50ffdc
commit e66625cfdf
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2009-12-22 17:15-EST Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSObject.m: Conditionally compile weak attribute for
Windows since it is not supported by the win32 linker.
2009-12-20 David Chisnall <theraven@gna.org> 2009-12-20 David Chisnall <theraven@gna.org>
* Source/NSObject.m: Set block superclass. * Source/NSObject.m: Set block superclass.

View file

@ -896,15 +896,19 @@ GSGarbageCollectorLog(char *msg, GC_word arg)
* Semi-private function in libobjc2 that initialises the classes used for * Semi-private function in libobjc2 that initialises the classes used for
* blocks. * blocks.
*/ */
#ifndef __MINGW32__
BOOL BOOL
objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak)); objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
#endif
+ (void)load + (void)load
{ {
#ifndef __MINGW32__
/* When NSObject is loaded, register it as the superclass of the block /* When NSObject is loaded, register it as the superclass of the block
* classes */ * classes */
if (objc_create_block_classes_as_subclasses_of) if (objc_create_block_classes_as_subclasses_of)
objc_create_block_classes_as_subclasses_of(self); objc_create_block_classes_as_subclasses_of(self);
#endif
} }
/** /**