diff options
author | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-25 21:58:20 -0400 |
---|---|---|
committer | Naram Qashat <cyberbotx@cyberbotx.com> | 2010-07-25 21:58:20 -0400 |
commit | ae38212c1ce829c783edf971081c90137abb49a0 (patch) | |
tree | 5c652d9cdc38103dec6fa112d57fca882b4e3e44 /src/memory.cpp | |
parent | 15d7f0f6fe8bb903275f603f734c13f65f3aa906 (diff) |
Epic commit to replace most of the strings in Anope with a single Anope::string class, plus some other little fixes here and there. If you follow 1.9.x development and are testing things, THIS is one of those things that NEEDS testing.
Diffstat (limited to 'src/memory.cpp')
-rw-r--r-- | src/memory.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/memory.cpp b/src/memory.cpp index 1fb1d2b21..12e0a1d08 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -21,25 +21,6 @@ /*************************************************************************/ /** - * malloc, replacement so we can trap for "out of memory" - * @param size to allocate - * @return void - */ -void *smalloc(long size) -{ - void *buf; - - if (!size) - size = 1; - buf = malloc(size); - if (!buf) - abort(); - return buf; -} - -/*************************************************************************/ - -/** * calloc, replacement so we can trap for "out of memory" * @param elsize to allocate * @param els size of members @@ -78,33 +59,6 @@ void *srealloc(void *oldptr, long newsize) } /*************************************************************************/ - -/** - * strdup, replacement so we can trap for "out of memory" - * @param oldptr Old Pointer - * @param newsize Size of new pointer - * @return void - */ -char *sstrdup(const char *src) -{ - char *ret = NULL; - if (src) - { - ret = new char[strlen(src) + 1]; - if (!ret) - abort(); - strcpy(ret, src); - } - else - { - Alog() << "sstrdup() called with NULL-arg"; - abort(); - } - - return ret; -} - -/*************************************************************************/ /*************************************************************************/ /* In the future: malloc() replacements that tell us if we're leaking and |