1 // cl_make_heap_string().
4 #include "base/cl_sysdep.h"
7 #include "cln/string.h"
12 #include "cln/malloc.h"
13 #include "base/cl_offsetof.h"
17 cl_heap_string* cl_make_heap_string (const char * ptr, unsigned long len)
19 var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
21 str->type = &cl_class_string;
24 var const char* ptr1 = ptr;
25 var char* ptr2 = &str->data[0];
27 for (count = len; count > 0; count--)