diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-01-04 23:07:57 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-01-06 15:52:39 +0900 |
| commit | 111045ecada16d3c047b90a26a1ec0af06e5a323 (patch) | |
| tree | 1832fd804e79961e2cf2496f96cf4adcef5edc6f /include | |
| parent | 282f907f1bf172b60043f886020f1051e127b446 (diff) | |
| download | mruby-111045ecada16d3c047b90a26a1ec0af06e5a323.tar.gz mruby-111045ecada16d3c047b90a26a1ec0af06e5a323.zip | |
Avoid creating temporary objects in `read_irep_record_1`; close #4920
The basic idea of this change is from @dearblue.
Note: the arguments of `mrb_str_pool()` have changed, but the function
is provided for internal use (No `MRB_API`). So basically you don't have
to worry about the change.
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/mruby/string.h b/include/mruby/string.h index 80b8fbaf8..a518d9147 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -447,7 +447,7 @@ MRB_API int mrb_str_cmp(mrb_state *mrb, mrb_value str1, mrb_value str2); */ MRB_API char *mrb_str_to_cstr(mrb_state *mrb, mrb_value str); -mrb_value mrb_str_pool(mrb_state *mrb, mrb_value str); +mrb_value mrb_str_pool(mrb_state *mrb, const char *s, mrb_int len, mrb_bool nofree); uint32_t mrb_str_hash(mrb_state *mrb, mrb_value str); mrb_value mrb_str_dump(mrb_state *mrb, mrb_value str); |
