mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +00:00
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:
parent
8628779d59
commit
de820d8151
1 changed files with 15 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue