Skip to content

Commit

Permalink
Add CS_aarch64 macro without parameter. (#2218)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rot127 committed Dec 18, 2023
1 parent 1fdb489 commit 484c7e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions include/capstone/capstone.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ extern "C" {
#define CS_AARCH64_VL_(x) AArch64Layout_VL_##x
#endif

#if CS_NEXT_VERSION < 6
#define CS_aarch64_ arm64
#else
#define CS_aarch64_ aarch64
#endif

#if CS_NEXT_VERSION < 6
#define CS_aarch64(x) arm64##x
#else
Expand Down
2 changes: 1 addition & 1 deletion tests/test_aarch64.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ int test_macros() {
CS_cs_aarch64() aarch64_detail = { 0 };
detail.aarch64 = aarch64_detail;
CS_aarch64_op() op = { 0 };
detail.CS_aarch64().operands[0] = op;
detail.CS_aarch64_.operands[0] = op;
CS_aarch64_reg() reg = 1;
CS_aarch64_cc() cc = AArch64CC_AL;
CS_aarch64_extender() aarch64_extender = AArch64_EXT_SXTB;
Expand Down

0 comments on commit 484c7e5

Please sign in to comment.