]> www.ginac.de Git - cln.git/blobdiff - src/base/string/cl_spushstring_append.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / base / string / cl_spushstring_append.cc
index 245d7a2b9036e7962549a5d2c8fd27980b0099ff..56a69bf74af47faefd1436576eaddef27b2eedca 100644 (file)
 
 #include <string.h> // declares memcpy()
 
+namespace cln {
+
 void cl_spushstring::append (const char * ptr, uintL len)
 {
        if (index + len > alloc) {
                var uintL newalloc = index+2*len;
                if (newalloc < 2*alloc) { newalloc = 2*alloc; }
-               var char* newbuffer = (char *) cl_malloc_hook(newalloc);
+               var char* newbuffer = (char *) malloc_hook(newalloc);
                memcpy(newbuffer,buffer,alloc);
-               cl_free_hook(buffer);
+               free_hook(buffer);
                buffer = newbuffer;
                alloc = newalloc;
        }
@@ -26,3 +28,5 @@ void cl_spushstring::append (const char * ptr, uintL len)
        for (uintL count = len; count > 0; count--)
                buffer[index++] = *ptr++;
 }
+
+}  // namespace cln