diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-12 14:20:18 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-08-18 22:17:48 +0900 |
| commit | f1767fd079a74ca5c5ec77f101816b7d657509d8 (patch) | |
| tree | f74df66a1fd0ac737ece521a39746dc5a16b2843 /src/object.c | |
| parent | 722d123b870af2a36a7ba3c0b5228b340269044b (diff) | |
| download | mruby-f1767fd079a74ca5c5ec77f101816b7d657509d8.tar.gz mruby-f1767fd079a74ca5c5ec77f101816b7d657509d8.zip | |
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.
Diffstat (limited to 'src/object.c')
| -rw-r--r-- | src/object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/object.c b/src/object.c index a78e9a443..368e90b9f 100644 --- a/src/object.c +++ b/src/object.c @@ -438,7 +438,7 @@ mrb_check_type(mrb_state *mrb, mrb_value x, enum mrb_vtype t) MRB_API mrb_value mrb_any_to_s(mrb_state *mrb, mrb_value obj) { - mrb_value str = mrb_str_buf_new(mrb, 20); + mrb_value str = mrb_str_new_capa(mrb, 20); const char *cname = mrb_obj_classname(mrb, obj); mrb_str_cat_lit(mrb, str, "#<"); |
