diff options
| author | Glenn Smith <glenn@vector35.com> | 2025-12-12 02:14:32 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2025-12-12 15:26:24 -0500 |
| commit | 9397116241069777614336493120489779020689 (patch) | |
| tree | 15820c2f83ba8763680c153157c3ce680d1c617d /binaryninjacore.h | |
| parent | 0238488101541494701887783104734147250961 (diff) | |
Generator: Detect flag enums and use IntFlag instead
Made possible by the new attributes in binja's type system.
Diffstat (limited to 'binaryninjacore.h')
| -rw-r--r-- | binaryninjacore.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/binaryninjacore.h b/binaryninjacore.h index f1f29cbe..8b26fb44 100644 --- a/binaryninjacore.h +++ b/binaryninjacore.h @@ -86,7 +86,10 @@ #endif // Define attributes for enums based on compiler support -#if __has_attribute(enum_extensibility) +#if defined(BN_TYPE_PARSER) + #define __BN_ENUM_ATTRIBUTES + #define __BN_OPTIONS_ATTRIBUTES __attr("options") +#elif __has_attribute(enum_extensibility) #define __BN_ENUM_ATTRIBUTES __attribute__((enum_extensibility(open))) #define __BN_OPTIONS_ATTRIBUTES __attribute__((flag_enum, enum_extensibility(open))) #else |
