1 // cl_make_heap_string().
12 #include "cl_malloc.h"
13 #include "cl_offsetof.h"
15 cl_heap_string* cl_make_heap_string (const char * ptr, unsigned long len)
17 var cl_heap_string* str = (cl_heap_string*) cl_malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
19 str->type = &cl_class_string;
22 var const char* ptr1 = ptr;
23 var char* ptr2 = &str->data[0];
25 for (count = len; count > 0; count--)