// Implementation.
-#include <string.h> // declares memcpy()
+#include <cstring> // 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;
}
for (uintL count = len; count > 0; count--)
buffer[index++] = *ptr++;
}
+
+} // namespace cln