diff --git a/blocks_runtime.m b/blocks_runtime.m index 3a78461..7be65c9 100644 --- a/blocks_runtime.m +++ b/blocks_runtime.m @@ -39,7 +39,7 @@ static void *_HeapBlockByRef = (void*)1; -OBJC_PUBLIC _Bool _Block_has_signature(id b) +OBJC_PUBLIC bool _Block_has_signature(void *b) { const struct Block_layout *block = (struct Block_layout*)b; return ((NULL != block) && (block->flags & BLOCK_HAS_SIGNATURE)); @@ -47,7 +47,7 @@ OBJC_PUBLIC _Bool _Block_has_signature(id b) /** * Returns the Objective-C type encoding for the block. */ -OBJC_PUBLIC const char * _Block_signature(id b) +OBJC_PUBLIC const char * _Block_signature(void *b) { const struct Block_layout *block = (struct Block_layout*)b; if ((NULL == block) || !(block->flags & BLOCK_HAS_SIGNATURE)) diff --git a/objc/blocks_runtime.h b/objc/blocks_runtime.h index c20564e..7a9d23f 100644 --- a/objc/blocks_runtime.h +++ b/objc/blocks_runtime.h @@ -7,22 +7,19 @@ * Blocks Runtime */ #include "Availability.h" +#include #ifdef __cplusplus -#define OBJC_BOOL_TYPE bool -#define OBJC_BLOCK_PTR_TYPE void* #define BLOCKS_EXPORT extern "C" #else -#define OBJC_BOOL_TYPE _Bool -#define OBJC_BLOCK_PTR_TYPE id -#define BLOCKS_EXPORT extern +#define BLOCKS_EXPORT extern #endif OBJC_PUBLIC BLOCKS_EXPORT void *_Block_copy(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 OBJC_BOOL_TYPE _Block_has_signature(OBJC_BLOCK_PTR_TYPE); -OBJC_PUBLIC BLOCKS_EXPORT const char * _Block_signature(OBJC_BLOCK_PTR_TYPE); +OBJC_PUBLIC BLOCKS_EXPORT bool _Block_has_signature(void *); +OBJC_PUBLIC BLOCKS_EXPORT const char * _Block_signature(void *); #define Block_copy(x) ((__typeof(x))_Block_copy((const void *)(x)))