diff --git a/r5dev/tier0/memstd.h b/r5dev/tier0/memstd.h index 4b21c2b1..1d27b76b 100644 --- a/r5dev/tier0/memstd.h +++ b/r5dev/tier0/memstd.h @@ -1,41 +1,41 @@ #ifndef MEMSTD_H #define MEMSTD_H -void* R_malloc(size_t nSize); -void R_free(void* pBlock); -void* R_realloc(void* pBlock, size_t nSize); -char* R_strdup(const char* pString); -void* R_calloc(size_t nCount, size_t nSize); +extern "C" void* R_malloc(size_t nSize); +extern "C" void R_free(void* pBlock); +extern "C" void* R_realloc(void* pBlock, size_t nSize); +extern "C" char* R_strdup(const char* pString); +extern "C" void* R_calloc(size_t nCount, size_t nSize); class IMemAlloc { public: template - T* Alloc(size_t nSize) + inline T* Alloc(size_t nSize) { const static int index = 1; return CallVFunc(index, this, nSize); } template - T* Realloc(T* pMem, size_t nSize) + inline T* Realloc(T* pMem, size_t nSize) { const static int index = 3; return CallVFunc(index, this, pMem, nSize); } template - void FreeDbg(T* pMem, const char* pFileName, int nLine) + inline void FreeDbg(T* pMem, const char* pFileName, int nLine) { const static int index = 4; // Same as free, but takes debug parameters. CallVFunc(index, this, pMem, pFileName, nLine); } template - void Free(T* pMem) + inline void Free(T* pMem) { const static int index = 5; CallVFunc(index, this, pMem); } template - size_t GetSize(T* pMem) + inline size_t GetSize(T* pMem) { const static int index = 6; return CallVFunc(index, this, pMem);