diff options
author | lsalzman <[email protected]> | 2013-05-07 10:11:22 +0300 |
---|---|---|
committer | lsalzman <[email protected]> | 2013-05-07 10:11:22 +0300 |
commit | 27d41dd2ae1d9b43cbf3c282241ef22ddf87242d (patch) | |
tree | 3e3d11f44014a86365c5d8f0ee7b545321eef8a8 /include | |
parent | ff4e2cab3071dd17d06b2849146b667766f6652e (diff) | |
download | enet-27d41dd2ae1d9b43cbf3c282241ef22ddf87242d.tar.gz enet-27d41dd2ae1d9b43cbf3c282241ef22ddf87242d.zip |
add enet_linked_version() for querying linked version
Diffstat (limited to 'include')
-rw-r--r-- | include/enet/enet.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/enet/enet.h b/include/enet/enet.h index 68a8233..e32d68f 100644 --- a/include/enet/enet.h +++ b/include/enet/enet.h @@ -27,6 +27,9 @@ extern "C" #define ENET_VERSION_MINOR 3 #define ENET_VERSION_PATCH 7 #define ENET_VERSION_CREATE(major, minor, patch) (((major)<<16) | ((minor)<<8) | (patch)) +#define ENET_VERSION_GET_MAJOR(version) (((version)>>16)&0xFF) +#define ENET_VERSION_GET_MINOR(version) (((version)>>8)&0xFF) +#define ENET_VERSION_GET_PATCH(version) ((version)&0xFF) #define ENET_VERSION ENET_VERSION_CREATE(ENET_VERSION_MAJOR, ENET_VERSION_MINOR, ENET_VERSION_PATCH) typedef enet_uint32 ENetVersion; @@ -452,6 +455,12 @@ ENET_API int enet_initialize_with_callbacks (ENetVersion version, const ENetCall */ ENET_API void enet_deinitialize (void); +/** + Gives the linked version of the ENet library. + @returns the version number +*/ +ENET_API ENetVersion enet_linked_version (void); + /** @} */ /** @defgroup private ENet private implementation functions */ |