diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-22 22:54:21 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-11-22 22:54:21 +0900 |
| commit | 39a11f323e26879d1101e31859ddb20068f12d56 (patch) | |
| tree | 1cf99dda98e7c7603eec73a07af869ca21ea8257 /include | |
| parent | abdd006df32aa12bef7f1819edfed3209e379e36 (diff) | |
| download | mruby-39a11f323e26879d1101e31859ddb20068f12d56.tar.gz mruby-39a11f323e26879d1101e31859ddb20068f12d56.zip | |
Remove `mrb_str_buf_new()` and `MRB_STR_BUF_MIN_SIZE`; close #5171
Diffstat (limited to 'include')
| -rw-r--r-- | include/mrbconf.h | 7 | ||||
| -rw-r--r-- | include/mruby/string.h | 2 |
2 files changed, 1 insertions, 8 deletions
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); |
