Skip to content

Commit

Permalink
fixed issue with const void* callback
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Sep 21, 2018
1 parent b2c1176 commit f640b43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/enet.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

#define ENET_VERSION_MAJOR 2
#define ENET_VERSION_MINOR 1
#define ENET_VERSION_PATCH 0
#define ENET_VERSION_PATCH 1
#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)
Expand Down Expand Up @@ -931,7 +931,7 @@ extern "C" {

ENET_API void * enet_packet_get_data(ENetPacket *);
ENET_API enet_uint32 enet_packet_get_length(ENetPacket *);
ENET_API void enet_packet_set_free_callback(ENetPacket *, const void *);
ENET_API void enet_packet_set_free_callback(ENetPacket *, void *);

ENET_API ENetPacket * enet_packet_create(const void *, size_t, enet_uint32);
ENET_API ENetPacket * enet_packet_create_offset(const void *, size_t, size_t, enet_uint32);
Expand Down Expand Up @@ -3434,7 +3434,7 @@ extern "C" {
return packet->dataLength;
}

void enet_packet_set_free_callback(ENetPacket *packet, const void *callback) {
void enet_packet_set_free_callback(ENetPacket *packet, void *callback) {
packet->freeCallback = callback;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enet.c",
"version": "2.1.0",
"version": "2.1.1",
"description": "ENet - Simple, lightweight and reliable UDP networking library written on pure C.",
"main": "include/enet.h",
"directories": {
Expand Down

0 comments on commit f640b43

Please sign in to comment.