summaryrefslogtreecommitdiffhomepage
path: root/src/rnet.h
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2020-01-19 12:10:09 +0100
committerraysan5 <[email protected]>2020-01-19 12:10:09 +0100
commit1c4dadcf6845037003345d5b8384066c855b80d8 (patch)
tree0f59a292ea57cb8e74333374b1b4494d42454391 /src/rnet.h
parentd797bb3e1cef4541eadc09ebe9c67f2b229613dd (diff)
downloadraylib-1c4dadcf6845037003345d5b8384066c855b80d8.tar.gz
raylib-1c4dadcf6845037003345d5b8384066c855b80d8.zip
Support custom memory allocators
Diffstat (limited to 'src/rnet.h')
-rw-r--r--src/rnet.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/rnet.h b/src/rnet.h
index 6110bf84..02c2cf1d 100644
--- a/src/rnet.h
+++ b/src/rnet.h
@@ -91,6 +91,17 @@
#define NOMCX // Modem Configuration Extensions
#define MMNOSOUND
+// Allow custom memory allocators
+#ifndef RNET_MALLOC
+ #define RNET_MALLOC(sz) malloc(sz)
+#endif
+#ifndef RNET_CALLOC
+ #define RNET_CALLOC(n,sz) calloc(n,sz)
+#endif
+#ifndef RNET_FREE
+ #define RNET_FREE(p) free(p)
+#endif
+
//----------------------------------------------------------------------------------
// Platform type definitions
// From: https://github.com/DFHack/clsocket/blob/master/src/Host.h