Separate mrb_str_buf_new and mrb_str_new_capa.

`mrb_str_buf_new` is an old function that ensures capacity size of
`MRB_STR_BUF_MIN_SIZE` minimum. Usually one need to use
`mrb_str_new_capa` instead.
This commit is contained in:
Yukihiro "Matz" Matsumoto
2017-08-12 14:20:18 +09:00
parent 722d123b87
commit f1767fd079
10 changed files with 31 additions and 24 deletions
+1 -1
View File
@@ -1093,7 +1093,7 @@ join_ary(mrb_state *mrb, mrb_value ary, mrb_value sep, mrb_value list)
mrb_ary_push(mrb, list, ary);
result = mrb_str_buf_new(mrb, 64);
result = mrb_str_new_capa(mrb, 64);
for (i=0; i<RARRAY_LEN(ary); i++) {
if (i > 0 && !mrb_nil_p(sep)) {