Wrap attribute in clang check

This commit is contained in:
Iain Smith
2024-08-26 23:37:14 +01:00
parent d05d24d384
commit 8e8cfa28e8

View File

@@ -47,9 +47,12 @@
// the header is a mismatch for the Yoga ABI. // the header is a mismatch for the Yoga ABI.
#define YG_ENUM_BEGIN(name) NS_ENUM(int, name) #define YG_ENUM_BEGIN(name) NS_ENUM(int, name)
#define YG_ENUM_END(name) #define YG_ENUM_END(name)
#else #elif defined(__clang__)
#define YG_ENUM_BEGIN(name) enum name #define YG_ENUM_BEGIN(name) enum name
#define YG_ENUM_END(name) __attribute__((enum_extensibility(closed))) name #define YG_ENUM_END(name) __attribute__((enum_extensibility(closed))) name
#else
#define YG_ENUM_BEGIN(name) enum name
#define YG_ENUM_END(name) name
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus