mrb_str_pool add string capa

This commit is contained in:
ksss
2014-03-25 08:44:59 +09:00
parent 13f0f597c8
commit ebf6da7e30
+1
View File
@@ -199,6 +199,7 @@ mrb_str_pool(mrb_state *mrb, mrb_value str)
ns->flags = 0;
ns->as.heap.ptr = (char *)mrb_malloc(mrb, (size_t)len+1);
ns->as.heap.len = len;
ns->as.heap.aux.capa = len;
if (ptr) {
memcpy(ns->as.heap.ptr, ptr, len);
}