1 // cl_make_heap_string().
7 #include "cln/string.h"
12 #include "cln/malloc.h"
13 #include "cl_offsetof.h"
18 cl_heap_string* cl_make_heap_string (unsigned long len)
20 var cl_heap_string* str = (cl_heap_string*) malloc_hook(offsetofa(cl_heap_string,data)+sizeof(char)*(len+1));
22 str->type = &cl_class_string;
24 return str; /* Have to fill data[0..len] yourself. */