Merge pull request #5697 from dearblue/mrb_alloca

Hides the class of string objects allocated by `mrb_alloca()`
This commit is contained in:
Yukihiro "Matz" Matsumoto
2022-04-24 14:00:49 +09:00
committed by GitHub
+1 -1
View File
@@ -293,7 +293,7 @@ MRB_API void*
mrb_alloca(mrb_state *mrb, size_t size)
{
struct RString *s;
s = MRB_OBJ_ALLOC(mrb, MRB_TT_STRING, mrb->string_class);
s = MRB_OBJ_ALLOC(mrb, MRB_TT_STRING, NULL);
return s->as.heap.ptr = (char*)mrb_malloc(mrb, size);
}