mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-io: fix Win32 declaration bugs
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user