From: res Date: Mon, 17 Dec 2007 03:37:43 +0000 (+0000) Subject: Move Mem_strdup into zone.c X-Git-Tag: xonotic-v0.1.0preview~2682 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=01862db243ec2171ca78e20709cf3ad080819a92;p=xonotic%2Fdarkplaces.git Move Mem_strdup into zone.c git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7809 d7cf8633-e32d-0410-b094-e92efae38249 --- 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 {