Skip to content

Commit

Permalink
add CS_ERR_VERSION to report error when binding version is different …
Browse files Browse the repository at this point in the history
…from core's API version
  • Loading branch information
aquynh committed Feb 8, 2014
1 parent 5bd0e2e commit 4f22028
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ const char *cs_strerror(cs_err code)
return "Details are unavailable (CS_ERR_DETAIL)";
case CS_ERR_MEMSETUP:
return "Dynamic memory management uninitialized (CS_ERR_MEMSETUP)";
case CS_ERR_VERSION:
return "Different API version between core & binding (CS_ERR_VERSION)";
}
}

Expand Down
1 change: 1 addition & 0 deletions include/capstone.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ typedef enum cs_err {
CS_ERR_OPTION, // Invalid/unsupported option: cs_option()
CS_ERR_DETAIL, // Information is unavailable because detail option is OFF
CS_ERR_MEMSETUP, // Dynamic memory management uninitialized (see CS_OPT_MEM)
CS_ERR_VERSION, // Unsupported version (bindings)
} cs_err;

/*
Expand Down

0 comments on commit 4f22028

Please sign in to comment.