Add EXTRA field to uc_version

This commit is contained in:
lazymio 2021-11-08 22:51:49 +01:00
parent 35017a614f
commit 56fcc07a7c
No known key found for this signature in database
GPG Key ID: DFF27E34A47CB873
2 changed files with 3 additions and 2 deletions

View File

@ -70,11 +70,12 @@ typedef size_t uc_hook;
// Unicorn API version
#define UC_API_MAJOR 2
#define UC_API_MINOR 0
#define UC_API_EXTRA 4
// Unicorn package version
#define UC_VERSION_MAJOR UC_API_MAJOR
#define UC_VERSION_MINOR UC_API_MINOR
#define UC_VERSION_EXTRA 0
#define UC_VERSION_EXTRA UC_API_EXTRA
/*
Macro to create combined version which can be compared to

2
uc.c
View File

@ -35,7 +35,7 @@ unsigned int uc_version(unsigned int *major, unsigned int *minor)
*minor = UC_API_MINOR;
}
return (UC_API_MAJOR << 8) + UC_API_MINOR;
return (UC_API_EXTRA << 16) + (UC_API_MAJOR << 8) + UC_API_MINOR;
}
UNICORN_EXPORT