mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
errno.c: fix int and mrb_int mixture.
`strerror(3) takes `int` not `mrb_int`.
This commit is contained in:
@@ -36,7 +36,7 @@ static const struct {
|
||||
#define E2C_LEN (sizeof(e2c) / sizeof(e2c[0]))
|
||||
|
||||
static void
|
||||
mrb_sce_init(mrb_state *mrb, mrb_value self, mrb_value m, mrb_int n)
|
||||
mrb_sce_init(mrb_state *mrb, mrb_value self, mrb_value m, int n)
|
||||
{
|
||||
mrb_value str;
|
||||
struct RClass *m_errno;
|
||||
@@ -86,7 +86,7 @@ mrb_sce_init_m(mrb_state *mrb, mrb_value self)
|
||||
n = -1;
|
||||
}
|
||||
}
|
||||
mrb_sce_init(mrb, self, m, n);
|
||||
mrb_sce_init(mrb, self, m, (int)n);
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ mrb_sce_sys_fail(mrb_state *mrb, mrb_value cls)
|
||||
msg = mrb_nil_value();
|
||||
}
|
||||
exc = mrb_obj_value(e);
|
||||
mrb_sce_init(mrb, exc, msg, no);
|
||||
mrb_sce_init(mrb, exc, msg, (int)no);
|
||||
mrb_exc_raise(mrb, exc);
|
||||
return mrb_nil_value(); /* NOTREACHED */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user