Added defines for __weak and __strong.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31591 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2010-11-07 14:48:21 +00:00
parent 8628779d59
commit de820d8151

View file

@ -113,6 +113,13 @@
#include <objc/encoding.h>
#endif
// Include the blocks runtime header if it's available (It shouldn't matter
// that this doesn't work on compilers that don't support __has_include(),
// because they also don't support blocks).
#if __has_include(<objc/block_runtime.h>)
# include <objc/block_runtime.h>
#endif
/*
* Hack for older compiler versions that don't have all defines
* needed in objc-api.h
@ -221,4 +228,12 @@
#include <stdint.h>
#endif
#if __has_feature(objc_gc)
#define __strong __attribute__((objc_gc(strong)))
#define __weak __attribute__((objc_gc(weak)))
#else
#define __strong
#define __weak
#endif
#endif /* __preface_h_OBJECTS_INCLUDE */