From 1f351e827a8e2fbbe22be5c07e81ab5d9dff31ba Mon Sep 17 00:00:00 2001 From: Satoshi Tanda Date: Wed, 28 Sep 2016 17:22:36 -0700 Subject: [PATCH] add explanation comment for use of CAPSTONE_API Signed-off-by: Satoshi Tanda --- arch/X86/X86Mapping.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/X86/X86Mapping.c b/arch/X86/X86Mapping.c index 9e2de505..1ce5f47f 100644 --- a/arch/X86/X86Mapping.c +++ b/arch/X86/X86Mapping.c @@ -2923,6 +2923,9 @@ static struct insn_reg2 insn_regs_intel2[] = { static struct insn_reg insn_regs_intel_sorted [ARR_SIZE(insn_regs_intel)]; +// Explicitly specified calling convention with CAPSTONE_API so that it is always +// compiled as __cdecl on MSVC and does not cause a compile error even when +// default calling convention is __stdcall (eg. capstone_static_winkernel project) static int CAPSTONE_API regs_cmp(const void *a, const void *b) { uint16_t l = ((struct insn_reg *)a)->insn;