|
|
|
@ -2,35 +2,28 @@
|
|
|
|
#pragma clang system_header
|
|
|
|
#pragma clang system_header
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Blocks Runtime
|
|
|
|
* Blocks Runtime
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
#include "Availability.h"
|
|
|
|
#include "Availability.h"
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <stdbool.h>
|
|
|
|
#define OBJC_BOOL_TYPE bool
|
|
|
|
|
|
|
|
#define OBJC_BLOCK_PTR_TYPE void*
|
|
|
|
#define BLOCKS_EXPORT extern "C"
|
|
|
|
#define BLOCKS_EXPORT extern "C"
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
|
|
|
|
#define OBJC_BOOL_TYPE _Bool
|
|
|
|
|
|
|
|
#define OBJC_BLOCK_PTR_TYPE id
|
|
|
|
#define BLOCKS_EXPORT extern
|
|
|
|
#define BLOCKS_EXPORT extern
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT void *_Block_copy(const void *);
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT void *_Block_copy(const void *);
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT void _Block_release(const void *);
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT void _Block_release(const void *);
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT const char *block_getType_np(const void *b) OBJC_NONPORTABLE;
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT const char *block_getType_np(const void *b) OBJC_NONPORTABLE;
|
|
|
|
#ifdef __OBJC__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT OBJC_BOOL_TYPE _Block_has_signature(OBJC_BLOCK_PTR_TYPE);
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT bool _Block_has_signature(id);
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT const char * _Block_signature(OBJC_BLOCK_PTR_TYPE);
|
|
|
|
#else
|
|
|
|
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT _Bool _Block_has_signature(id);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT const char * _Block_signature(id);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT bool _Block_has_signature(void *);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT _Bool _Block_has_signature(void *);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
OBJC_PUBLIC BLOCKS_EXPORT const char * _Block_signature(void *);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define Block_copy(x) ((__typeof(x))_Block_copy((const void *)(x)))
|
|
|
|
#define Block_copy(x) ((__typeof(x))_Block_copy((const void *)(x)))
|
|
|
|
#define Block_release(x) _Block_release((const void *)(x))
|
|
|
|
#define Block_release(x) _Block_release((const void *)(x))
|
|
|
|
|