summaryrefslogtreecommitdiff
path: root/libs/enet/callbacks.c
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-06-19 10:10:15 +0200
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-06-19 10:10:15 +0200
commit61d02a395b0ca594640f0fb917d7162a5aba2c37 (patch)
tree7dd6f7f540dda3d89d37bc7e19f3f4d27dd53c85 /libs/enet/callbacks.c
parent5da59b807d9840fb23feb42df729bf5e88ee9678 (diff)
parentac0b338b3e026d0d05a447894de9a6a994da82dc (diff)
downloadmana-online-player-list.tar.gz
mana-online-player-list.tar.bz2
mana-online-player-list.tar.xz
mana-online-player-list.zip
Merge branch 'master' into online-player-listonline-player-list
Conflicts: src/net/tmwa/chathandler.cpp
Diffstat (limited to 'libs/enet/callbacks.c')
-rw-r--r--libs/enet/callbacks.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/libs/enet/callbacks.c b/libs/enet/callbacks.c
deleted file mode 100644
index f9412825..00000000
--- a/libs/enet/callbacks.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/**
- @file callbacks.c
- @brief ENet callback functions
-*/
-#define ENET_BUILDING_LIB 1
-#include "enet/enet.h"
-
-static ENetCallbacks callbacks = { malloc, free, abort };
-
-int
-enet_initialize_with_callbacks (ENetVersion version, const ENetCallbacks * inits)
-{
- if (version < ENET_VERSION_CREATE (1, 3, 0))
- return -1;
-
- if (inits -> malloc != NULL || inits -> free != NULL)
- {
- if (inits -> malloc == NULL || inits -> free == NULL)
- return -1;
-
- callbacks.malloc = inits -> malloc;
- callbacks.free = inits -> free;
- }
-
- if (inits -> no_memory != NULL)
- callbacks.no_memory = inits -> no_memory;
-
- return enet_initialize ();
-}
-
-void *
-enet_malloc (size_t size)
-{
- void * memory = callbacks.malloc (size);
-
- if (memory == NULL)
- callbacks.no_memory ();
-
- return memory;
-}
-
-void
-enet_free (void * memory)
-{
- callbacks.free (memory);
-}
-