Fix warning from VC regarding implicit int conversion.
MODIFY
mrbgems/mruby-eval/src/eval.c
mrbgems/mruby-eval/src/eval.c
@@ -20,7 +20,7 @@ create_proc_from_string(mrb_state *mrb, const char *s, mrb_int len, mrb_value bi
struct REnv *e;
mrb_callinfo *ci; /* callinfo of eval caller */
struct RClass *target_class = NULL;
- int bidx;
+ mrb_int bidx;
if (!mrb_nil_p(binding)) {
mrb_raise(mrb, E_ARGUMENT_ERROR, "Binding of eval must be nil.");

MODIFY
mrbgems/mruby-print/src/print.c
mrbgems/mruby-print/src/print.c
#endif
static void
-printstr(mrb_state *mrb, const char *p, size_t len)
+printstr(mrb_state *mrb, const char *p, mrb_int len)
{
#if defined(_WIN32)
if (isatty(fileno(stdout))) {
DWORD written;
- size_t wlen = MultiByteToWideChar(CP_UTF8, 0, p, len, NULL, 0);
+ int wlen = MultiByteToWideChar(CP_UTF8, 0, p, (int)len, NULL, 0);
wchar_t* utf16 = (wchar_t*)mrb_malloc(mrb, (wlen+1) * sizeof(wchar_t));
if (MultiByteToWideChar(CP_UTF8, 0, p, len, utf16, wlen) > 0) {
utf16[wlen] = 0;
WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
- utf16, wlen, &written, NULL);
+ utf16, (DWORD)wlen, &written, NULL);
}
mrb_free(mrb, utf16);
} else
#endif
- fwrite(p, len, 1, stdout);
+ fwrite(p, (size_t)len, 1, stdout);
fflush(stdout);
}

MODIFY
mrbgems/mruby-rational/src/rational.c
mrbgems/mruby-rational/src/rational.c
@@ -115,7 +115,7 @@ rational_new_f(mrb_state *mrb, mrb_float f0)
if (f < 0) { neg = 1; f = -f; }
while (f != floor(f)) { n <<= 1; f *= 2; }
- d = f;
+ d = (mrb_int)f;
/* continued fraction and check denominator each step */
for (i = 0; i < 64; i++) {

MODIFY
src/vm.c
src/vm.c
@@ -223,7 +223,7 @@ mrb_stack_extend(mrb_state *mrb, mrb_int room)
}
static inline struct REnv*
-uvenv(mrb_state *mrb, int up)
+uvenv(mrb_state *mrb, mrb_int up)
{
const struct RProc *proc = mrb->c->ci->proc;
struct REnv *e;

Fix warning from VC regarding implicit int conversion.