From fce438cd1ca3806f2259526c7ae84a38b04e6df1 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 19 Jan 2020 11:21:29 +0100 Subject: [PATCH] Support custom memory allocators --- src/raygui.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/raygui.h b/src/raygui.h index 1fb9812..4247950 100644 --- a/src/raygui.h +++ b/src/raygui.h @@ -156,6 +156,17 @@ #endif #endif +// Allow custom memory allocators +#ifndef RAYGUI_MALLOC + #define RAYGUI_MALLOC(sz) malloc(sz) +#endif +#ifndef RAYGUI_CALLOC + #define RAYGUI_CALLOC(n,sz) calloc(n,sz) +#endif +#ifndef RAYGUI_FREE + #define RAYGUI_FREE(p) free(p) +#endif + //---------------------------------------------------------------------------------- // Defines and Macros //----------------------------------------------------------------------------------