mirror of
https://github.com/capstone-engine/capstone.git
synced 2025-02-13 02:33:34 +00:00
cs_version() can accept NULL arguments. this is useful if you dont care about major/minor, but only want to get returned combined version
This commit is contained in:
parent
9a197b35a1
commit
0877747bcd
@ -2,13 +2,13 @@
|
||||
CAPSTONE_ARCHS =
|
||||
|
||||
# Comment the line below if you don't want to ARM support
|
||||
CAPSTONE_ARCHS += arm
|
||||
#CAPSTONE_ARCHS += arm
|
||||
|
||||
# Comment the line below if you don't want to ARM64 support
|
||||
CAPSTONE_ARCHS += aarch64
|
||||
#CAPSTONE_ARCHS += aarch64
|
||||
|
||||
# Comment the line below if you don't want to Mips support
|
||||
CAPSTONE_ARCHS += mips
|
||||
#CAPSTONE_ARCHS += mips
|
||||
|
||||
# Comment the line below if you don't want to X86 support
|
||||
CAPSTONE_ARCHS += x86
|
||||
|
6
cs.c
6
cs.c
@ -19,8 +19,10 @@ unsigned int all_arch = 0;
|
||||
|
||||
unsigned int cs_version(int *major, int *minor)
|
||||
{
|
||||
*major = CS_API_MAJOR;
|
||||
*minor = CS_API_MINOR;
|
||||
if (major != NULL && minor != NULL) {
|
||||
*major = CS_API_MAJOR;
|
||||
*minor = CS_API_MINOR;
|
||||
}
|
||||
|
||||
return (CS_API_MAJOR << 8) + CS_API_MINOR;
|
||||
}
|
||||
|
@ -141,6 +141,9 @@ typedef enum cs_err {
|
||||
|
||||
For example, second API version would return 1 in @major, and 1 in @minor
|
||||
The return value would be 0x0101
|
||||
|
||||
NOTE: if you only care about returned value, but not major and minor values,
|
||||
set both arguments to NULL.
|
||||
*/
|
||||
unsigned int cs_version(int *major, int *minor);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user