* Headers/GSBlocks.h: weakly import _Block_copy and _Block_release

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36735 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
lubosd 2013-06-20 22:04:14 +00:00
parent eacd4a4a48
commit b5f4ebc70d
2 changed files with 28 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2013-06-21 Lubos Dolezel <lubos@dolezel.info>
* Headers/GSBlocks.h: weakly import _Block_copy and _Block_release
2013-06-08 Lubos Dolezel <lubos@dolezel.info>
* Source/NSTimeZone.m

View file

@ -94,5 +94,29 @@ typedef retTy(^name)()
#endif /* __has_feature(blocks) */
#ifdef __cplusplus
extern "C" {
#endif
/**
* _Block_copy and _Block_release are weakly imported, but can be assumed
* to be available whenever a feature using blocks is accessed
* by an application.
*/
void *_Block_copy(void *) __attribute__((weak_import));
void _Block_release(void *) __attribute__((weak_import));
#ifdef __cplusplus
}
#endif
#ifndef Block_copy
# define Block_copy(x) ((__typeof(x))_Block_copy((void *)(x)))
#endif
#ifndef Block_release
# define Block_release(x) _Block_release((void *)(x))
#endif
#endif /* __GSBlocks_h_GNUSTEP_BASE_INCLUDE */