Update GSBlocks.h

Get compatible with Clang
This commit is contained in:
Zenny Chen 2017-11-19 00:13:21 +08:00 committed by GitHub
parent 9bbcd75d16
commit eb2c218781
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,8 +120,8 @@ extern "C" {
/* weak attributed supported only with ELF, MINGW is COFF */
#ifndef __MINGW32__
void *_Block_copy(void *) __attribute__((weak));
void _Block_release(void *) __attribute__((weak));
void *_Block_copy(const void *) __attribute__((weak));
void _Block_release(const void *) __attribute__((weak));
#endif /* __MINGW32__ */
@ -130,10 +130,10 @@ void _Block_release(void *) __attribute__((weak));
#endif
#ifndef Block_copy
# define Block_copy(x) ((__typeof(x))_Block_copy((void *)(x)))
# define Block_copy(x) ((__typeof(x))_Block_copy((const void *)(x)))
#endif
#ifndef Block_release
# define Block_release(x) _Block_release((void *)(x))
# define Block_release(x) _Block_release((const void *)(x))
#endif
#endif /* __GSBlocks_h_GNUSTEP_BASE_INCLUDE */