X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fmem.h;h=e864bbf0be78eaeb2dabc30609a4d29ad2e4bdb8;hp=d7a4bfeb32343bf0e75d40576cdddb768ad70da8;hb=bdad407fb79c2f7be9f3603694ebdeadc645b52d;hpb=03b598c965020825e9ffa88a8d32b8c1170f2419 diff --git a/lib/mem.h b/lib/mem.h index d7a4bfe..e864bbf 100644 --- a/lib/mem.h +++ b/lib/mem.h @@ -1,13 +1,27 @@ #ifndef __mem_h__ #define __mem_h__ +#ifdef __cplusplus +extern "C" { +#endif + +#include "../config.h" + #define ALLOC_ARRAY(type, num) (((type)*)rfxalloc(sizeof(type)*(num))) void* rfx_alloc(int size); void* rfx_calloc(int size); void* rfx_realloc(void*data, int size); void rfx_free(void*data); +#ifndef HAVE_CALLOC +void* rfx_calloc_replacement(int nmemb, int size); +#endif #ifdef MEMORY_INFO long rfx_memory_used(); char* rfx_memory_used_str(); #endif + +#ifdef __cplusplus +} +#endif + #endif //__mem_h__