Merge pull request #332 from qmfrederik/fixes/blocks-header-detection

Use `__has_include` to choose between <Block.h> and <objc/blocks_runtime.h>
This commit is contained in:
rfm 2024-04-14 11:46:12 +01:00 committed by GitHub
commit b9ae7bf03c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -355,7 +355,7 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; }
*/
#if __has_feature(blocks)
# if OBJC2RUNTIME
# if defined(__APPLE__)
# if __has_include(<Block.h>)
# include <Block.h>
# else
# include <objc/blocks_runtime.h>