vm.c: adjust integer types.

parent 9037e447
...@@ -422,7 +422,7 @@ mrb_ci_nregs(mrb_callinfo *ci) ...@@ -422,7 +422,7 @@ mrb_ci_nregs(mrb_callinfo *ci)
const struct RProc *p; const struct RProc *p;
if (!ci) return 4; if (!ci) return 4;
uint8_t nregs = mrb_ci_bidx(ci) + 1; /* self + args + kargs + blk */ mrb_int nregs = mrb_ci_bidx(ci) + 1; /* self + args + kargs + blk */
p = ci->proc; p = ci->proc;
if (p && !MRB_PROC_CFUNC_P(p) && p->body.irep && p->body.irep->nregs > nregs) { if (p && !MRB_PROC_CFUNC_P(p) && p->body.irep && p->body.irep->nregs > nregs) {
return p->body.irep->nregs; return p->body.irep->nregs;
...@@ -471,7 +471,7 @@ prepare_missing(mrb_state *mrb, mrb_value recv, mrb_sym mid, struct RClass **cls ...@@ -471,7 +471,7 @@ prepare_missing(mrb_state *mrb, mrb_value recv, mrb_sym mid, struct RClass **cls
argv[1] = argv[n]; argv[1] = argv[n];
argv[2] = blk; argv[2] = blk;
} }
*c = 15 | (nk<<4); *c = 15 | (uint16_t)(nk<<4);
mrb_ary_unshift(mrb, args, mrb_symbol_value(mid)); mrb_ary_unshift(mrb, args, mrb_symbol_value(mid));
return m; return m;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment