]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - zone.h
zone: Pass __FILE__ and __LINE__ to Mem_strdup
[xonotic/darkplaces.git] / zone.h
diff --git a/zone.h b/zone.h
index 5fe3c63d19a43f8121aa66bdeeda62b8966730eb..46b2d1df1125a51ee03375eb2d42bfafd46280bd 100644 (file)
--- a/zone.h
+++ b/zone.h
@@ -86,6 +86,7 @@ mempool_t;
 #define Mem_Memalign(pool,alignment,size) _Mem_Alloc(pool, NULL, size, alignment, __FILE__, __LINE__)
 #define Mem_Realloc(pool,data,size) _Mem_Alloc(pool, data, size, 16, __FILE__, __LINE__)
 #define Mem_Free(mem) _Mem_Free(mem, __FILE__, __LINE__)
+#define Mem_strdup(pool, s) _Mem_strdup(pool, s, __FILE__, __LINE__)
 #define Mem_CheckSentinels(data) _Mem_CheckSentinels(data, __FILE__, __LINE__)
 #if MEMPARANOIA
 #define Mem_CheckSentinelsGlobal()  _Mem_CheckSentinelsGlobal(__FILE__, __LINE__)
@@ -106,7 +107,7 @@ void _Mem_CheckSentinelsGlobal(const char *filename, int fileline);
 // if pool is NULL this searches ALL pools for the allocation
 qbool Mem_IsAllocated(mempool_t *pool, void *data);
 
-char* Mem_strdup (mempool_t *pool, const char* s);
+char* _Mem_strdup (mempool_t *pool, const char* s, const char *filename, int fileline);
 
 typedef struct memexpandablearray_array_s
 {
@@ -142,7 +143,9 @@ void Memory_Shutdown (void);
 void Memory_Init_Commands (void);
 
 extern mempool_t *zonemempool;
-#define Z_Malloc(size) Mem_Alloc(zonemempool,size)
+#define Z_Malloc(size) Mem_Alloc(zonemempool, size)
+#define Z_Realloc(data, size) Mem_Realloc(zonemempool, data, size)
+#define Z_strdup(s) Mem_strdup(zonemempool, s)
 #define Z_Free(data) Mem_Free(data)
 
 extern struct cvar_s developer_memory;