From 72b1f9d1fa03e5d2ad03d0a0d10d11c62286bc9c Mon Sep 17 00:00:00 2001 From: Jordan Schidlowsky Date: Wed, 10 Jul 2019 10:38:11 -0600 Subject: [PATCH] _Bool fix for cpp compilation --- objc/blocks_runtime.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/objc/blocks_runtime.h b/objc/blocks_runtime.h index 030c5c1..9f1545f 100644 --- a/objc/blocks_runtime.h +++ b/objc/blocks_runtime.h @@ -5,9 +5,9 @@ /* * Blocks Runtime */ - #include "Availability.h" #ifdef __cplusplus +#include #define BLOCKS_EXPORT extern "C" #else #define BLOCKS_EXPORT extern @@ -17,10 +17,18 @@ 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; #ifdef __OBJC__ +#ifdef __cplusplus +OBJC_PUBLIC BLOCKS_EXPORT bool _Block_has_signature(id); +#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