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/vm.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/vm.c')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -813,7 +813,7 @@ localjump_error(mrb_state *mrb, localjump_error_kind kind) mrb_value msg; mrb_value exc; - msg = mrb_str_buf_new(mrb, sizeof(lead) + 7); + msg = mrb_str_new_capa(mrb, sizeof(lead) + 7); mrb_str_cat(mrb, msg, lead, sizeof(lead) - 1); mrb_str_cat(mrb, msg, kind_str[kind], kind_str_len[kind]); exc = mrb_exc_new_str(mrb, E_LOCALJUMP_ERROR, msg); |
