diff options
Diffstat (limited to 'src/string.c')
| -rw-r--r-- | src/string.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/string.c b/src/string.c index d58886b38..465398b18 100644 --- a/src/string.c +++ b/src/string.c @@ -158,6 +158,10 @@ mrb_str_new_empty(mrb_state *mrb, mrb_value str) return mrb_obj_value(s); } +#ifndef MRB_STR_BUF_MIN_SIZE +# define MRB_STR_BUF_MIN_SIZE 128 +#endif + mrb_value mrb_str_buf_new(mrb_state *mrb, int capa) { @@ -165,8 +169,8 @@ mrb_str_buf_new(mrb_state *mrb, int capa) s = mrb_obj_alloc_string(mrb); - if (capa < STR_BUF_MIN_SIZE) { - capa = STR_BUF_MIN_SIZE; + if (capa < MRB_STR_BUF_MIN_SIZE) { + capa = MRB_STR_BUF_MIN_SIZE; } s->len = 0; s->aux.capa = capa; |
