From 39a11f323e26879d1101e31859ddb20068f12d56 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sun, 22 Nov 2020 22:54:21 +0900 Subject: Remove `mrb_str_buf_new()` and `MRB_STR_BUF_MIN_SIZE`; close #5171 --- include/mrbconf.h | 7 ------- include/mruby/string.h | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'include') diff --git a/include/mrbconf.h b/include/mrbconf.h index 506fefb18..cddcebc0d 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -133,9 +133,6 @@ /* page size of memory pool */ //#define POOL_PAGE_SIZE 16000 -/* initial minimum size for string buffer */ -//#define MRB_STR_BUF_MIN_SIZE 128 - /* arena size */ //#define MRB_GC_ARENA_SIZE 100 @@ -203,10 +200,6 @@ # define KHASH_DEFAULT_SIZE 16 # endif -# ifndef MRB_STR_BUF_MIN_SIZE -# define MRB_STR_BUF_MIN_SIZE 32 -# endif - # ifndef MRB_HEAP_PAGE_SIZE # define MRB_HEAP_PAGE_SIZE 256 # endif diff --git a/include/mruby/string.h b/include/mruby/string.h index 8384128c7..d53f09e96 100644 --- a/include/mruby/string.h +++ b/include/mruby/string.h @@ -339,7 +339,7 @@ MRB_API mrb_value mrb_string_type(mrb_state *mrb, mrb_value str); MRB_API mrb_value mrb_str_new_capa(mrb_state *mrb, size_t capa); -MRB_API mrb_value mrb_str_buf_new(mrb_state *mrb, size_t capa); +#define mrb_str_buf_new(mrb, capa) mrb_str_new_capa(mrb, (capa)) /* NULL terminated C string from mrb_value */ MRB_API const char *mrb_string_cstr(mrb_state *mrb, mrb_value str); -- cgit v1.2.3