From 111045ecada16d3c047b90a26a1ec0af06e5a323 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 4 Jan 2020 23:07:57 +0900 Subject: 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. --- include/mruby/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') 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); -- cgit v1.2.3