mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
* 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:
parent
eacd4a4a48
commit
b5f4ebc70d
2 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue