Skip to content

Commit

Permalink
Add macro for meta programming.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Aug 26, 2023
1 parent 70eace0 commit 230a257
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/capstone/aarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ extern "C" {
#pragma warning(disable : 4201)
#endif

/// Macro for meta programming.
/// Meant for projects using Capstone and need to support multiple
/// versions of it. Prepends the old "ARM64" or
/// the new "AArch64" name depending on version.
#if CS_NEXT_VERSION < 6
#define CS_AARCH64(x) ARM64##x
#else
#define CS_AARCH64(x) AArch64##x
#endif

#if CS_NEXT_VERSION < 6
#define CS_aarch64(x) arm64##x
#else
#define CS_aarch64(x) aarch64##x
#endif

/// AArch64 shift type
typedef enum aarch64_shifter {
AArch64_SFT_INVALID = 0,
Expand Down

0 comments on commit 230a257

Please sign in to comment.