From 01862db243ec2171ca78e20709cf3ad080819a92 Mon Sep 17 00:00:00 2001 From: res Date: Mon, 17 Dec 2007 03:37:43 +0000 Subject: [PATCH] Move Mem_strdup into zone.c git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7809 d7cf8633-e32d-0410-b094-e92efae38249 --- zone.c | 9 +++++++++ zone.h | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/zone.c b/zone.c index 32655d9a..a945a850 100644 --- a/zone.c +++ b/zone.c @@ -558,6 +558,15 @@ void MemStats_f(void) } +char* Mem_strdup (mempool_t *pool, const char* s) +{ + char* p; + if (s == NULL) return NULL; + p = (char*)Mem_Alloc (pool, strlen (s) + 1); + strcpy (p, s); + return p; +} + /* ======================== Memory_Init diff --git a/zone.h b/zone.h index a71916c0..69d6f1b6 100644 --- a/zone.h +++ b/zone.h @@ -135,14 +135,7 @@ void _Mem_CheckSentinelsGlobal(const char *filename, int fileline); // if pool is NULL this searches ALL pools for the allocation qboolean Mem_IsAllocated(mempool_t *pool, void *data); -static char* Mem_strdup (mempool_t *pool, const char* s) -{ - char* p; - if (s == NULL) return NULL; - p = (char*)Mem_Alloc (pool, strlen (s) + 1); - strcpy (p, s); - return p; -} +char* Mem_strdup (mempool_t *pool, const char* s); typedef struct memexpandablearray_array_s { -- 2.39.2