mruby-io: fix Win32 declaration bugs

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-05-14 01:34:43 +09:00
parent a147b2c149
commit 169114666a
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -368,7 +368,7 @@ mrb_file__gethome(mrb_state *mrb, mrb_value klass)
mrb_locale_free(home);
return path;
#else /* _WIN32 */
argc = mrb_get_argc(mrb);
mrb_int argc = mrb_get_argc(mrb);
if (argc == 0) {
home = getenv("USERPROFILE");
if (home == NULL) {
+1 -2
View File
@@ -396,7 +396,6 @@ io_s_popen_args(mrb_state *mrb, mrb_value klass,
static mrb_value
io_s_popen(mrb_state *mrb, mrb_value klass)
{
mrb_value io;
int doexec;
int opt_in, opt_out, opt_err;
const char *cmd;
@@ -1792,7 +1791,7 @@ io_gets(mrb_state *mrb, mrb_value io)
for (;;) {
if (rs_given) { /* with RS */
int rslen = RSTRING_LEN(rs);
mrb_int rslen = RSTRING_LEN(rs);
mrb_int idx = io_find_index(fptr, RSTRING_PTR(rs), rslen);
if (idx >= 0) { /* found */
mrb_int n = idx+rslen;