Skip to content

Commit

Permalink
Merge branch 'master' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Oct 25, 2016
2 parents 680080a + f585a84 commit 00c3fa1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
11 changes: 10 additions & 1 deletion bindings/python/capstone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
'CS_API_MAJOR',
'CS_API_MINOR',

'CS_VERSION_MAJOR',
'CS_VERSION_MINOR',
'CS_VERSION_EXTRA',

'CS_ARCH_ARM',
'CS_ARCH_ARM64',
'CS_ARCH_MIPS',
Expand Down Expand Up @@ -100,7 +104,12 @@
CS_API_MAJOR = 3
CS_API_MINOR = 0

__version__ = "%s.%s" %(CS_API_MAJOR, CS_API_MINOR)
# Package version
CS_VERSION_MAJOR = CS_API_MAJOR
CS_VERSION_MINOR = CS_API_MINOR
CS_VERSION_EXTRA = 5

__version__ = "%u.%u.%u" %(CS_VERSION_MAJOR, CS_VERSION_MINOR, CS_VERSION_EXTRA)

# architectures
CS_ARCH_ARM = 0
Expand Down
2 changes: 1 addition & 1 deletion cstool/cstool.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static uint8_t *preprocess(char *code, size_t *size)

static void usage(char *prog)
{
printf("Cstool v%s for Capstone Disassembler Engine (core v%u.%u)\n\n", VERSION, CS_API_MAJOR, CS_API_MINOR);
printf("Cstool v%s for Capstone Disassembler Engine (core v%u.%u.%u)\n\n", VERSION, CS_VERSION_MAJOR, CS_VERSION_MINOR, CS_VERSION_EXTRA);
printf("Syntax: %s [-d] <arch+mode> <assembly-hexstring> [start-address-in-hex-format]\n", prog);
printf("\nThe following <arch+mode> options are supported:\n");

Expand Down
5 changes: 5 additions & 0 deletions include/capstone.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ extern "C" {
#define CS_API_MAJOR 3
#define CS_API_MINOR 0

// Capstone package version
#define CS_VERSION_MAJOR CS_API_MAJOR
#define CS_VERSION_MINOR CS_API_MINOR
#define CS_VERSION_EXTRA 5

// Macro to create combined version which can be compared to
// result of cs_version() API.
#define CS_MAKE_VERSION(major, minor) ((major << 8) + minor)
Expand Down

0 comments on commit 00c3fa1

Please sign in to comment.