summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-io/src/file.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-22 22:54:21 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-11-22 22:54:21 +0900
commit39a11f323e26879d1101e31859ddb20068f12d56 (patch)
tree1cf99dda98e7c7603eec73a07af869ca21ea8257 /mrbgems/mruby-io/src/file.c
parentabdd006df32aa12bef7f1819edfed3209e379e36 (diff)
downloadmruby-39a11f323e26879d1101e31859ddb20068f12d56.tar.gz
mruby-39a11f323e26879d1101e31859ddb20068f12d56.zip
Remove `mrb_str_buf_new()` and `MRB_STR_BUF_MIN_SIZE`; close #5171
Diffstat (limited to 'mrbgems/mruby-io/src/file.c')
-rw-r--r--mrbgems/mruby-io/src/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-io/src/file.c b/mrbgems/mruby-io/src/file.c
index ab325195c..d4f2b24e4 100644
--- a/mrbgems/mruby-io/src/file.c
+++ b/mrbgems/mruby-io/src/file.c
@@ -258,7 +258,7 @@ mrb_file_realpath(mrb_state *mrb, mrb_value klass)
pathname = s;
}
cpath = mrb_locale_from_utf8(RSTRING_CSTR(mrb, pathname), -1);
- result = mrb_str_buf_new(mrb, PATH_MAX);
+ result = mrb_str_new_capa(mrb, PATH_MAX);
if (realpath(cpath, RSTRING_PTR(result)) == NULL) {
mrb_locale_free(cpath);
mrb_sys_fail(mrb, cpath);