mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-04 02:20:48 +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
4e03372c34
commit
aeac221ff6
1 changed files with 15 additions and 0 deletions
|
@ -113,6 +113,13 @@
|
||||||
#include <objc/encoding.h>
|
#include <objc/encoding.h>
|
||||||
#endif
|
#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
|
* Hack for older compiler versions that don't have all defines
|
||||||
* needed in objc-api.h
|
* needed in objc-api.h
|
||||||
|
@ -221,4 +228,12 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#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 */
|
#endif /* __preface_h_OBJECTS_INCLUDE */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue