core: add UV_VERSION_HEX macro

PR-URL: https://github.com/libuv/libuv/pull/412
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Saúl Ibarra Corretgé 2015-06-29 18:27:20 +02:00
parent ca3ec90c6c
commit ede94898aa
2 changed files with 5 additions and 5 deletions

View File

@ -36,4 +36,8 @@
#define UV_VERSION_IS_RELEASE 1
#define UV_VERSION_SUFFIX ""
#define UV_VERSION_HEX ((UV_VERSION_MAJOR << 16) | \
(UV_VERSION_MINOR << 8) | \
(UV_VERSION_PATCH))
#endif /* UV_VERSION_H */

View File

@ -21,10 +21,6 @@
#include "uv.h"
#define UV_VERSION ((UV_VERSION_MAJOR << 16) | \
(UV_VERSION_MINOR << 8) | \
(UV_VERSION_PATCH))
#define UV_STRINGIFY(v) UV_STRINGIFY_HELPER(v)
#define UV_STRINGIFY_HELPER(v) #v
@ -40,7 +36,7 @@
unsigned int uv_version(void) {
return UV_VERSION;
return UV_VERSION_HEX;
}