From c54d5abdaf64f5dd8d6ba4d1a6cfd094994f7018 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sun, 24 Aug 2025 06:45:41 +0900 Subject: [PATCH] mruby-dir: unify int and mrb_int types for consistency Change int variables to mrb_int in mrb_dir_getwd and mrb_dir_chroot to maintain consistent use of mruby's integer type internally. Keep explicit casts only at system interface boundaries where different types are required by system calls. Eliminates VC warning C4267 while following the same type unification approach used in pack.c. Co-authored-by: Claude --- mrbgems/mruby-dir/src/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-dir/src/dir.c b/mrbgems/mruby-dir/src/dir.c index 9e05bd4f8..28cc85c5d 100644 --- a/mrbgems/mruby-dir/src/dir.c +++ b/mrbgems/mruby-dir/src/dir.c @@ -246,7 +246,7 @@ mrb_dir_chroot(mrb_state *mrb, mrb_value self) return mrb_fixnum_value(0); #else const char *path; - int res; + mrb_int res; mrb_get_args(mrb, "z", &path); res = chroot(path);