mirror of
https://github.com/lsalzman/enet
synced 2024-11-21 06:25:59 -07:00
add enet_linked_version() for querying linked version
This commit is contained in:
parent
ff4e2cab30
commit
27d41dd2ae
3 changed files with 17 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
|||
* added enet_linked_version() for checking the linked version
|
||||
* added enet_socket_get_address() for querying the local address of a socket
|
||||
* silenced some debugging prints unless ENET_DEBUG is defined during compilation
|
||||
|
||||
ENet 1.3.7 (March 6, 2013):
|
||||
|
||||
|
|
|
@ -27,6 +27,12 @@ enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits
|
|||
|
||||
return enet_initialize ();
|
||||
}
|
||||
|
||||
ENetVersion
|
||||
enet_linked_version (void)
|
||||
{
|
||||
return ENET_VERSION;
|
||||
}
|
||||
|
||||
void *
|
||||
enet_malloc (size_t size)
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue