Clear mrb_callinfo struct by zero initializer.

parent 1fc9a301
......@@ -253,6 +253,7 @@ static inline mrb_callinfo*
cipush(mrb_state *mrb)
{
struct mrb_context *c = mrb->c;
static const mrb_callinfo ci_zero = { 0 };
mrb_callinfo *ci = c->ci;
int ridx = ci->ridx;
......@@ -265,13 +266,9 @@ cipush(mrb_state *mrb)
c->ciend = c->cibase + size * 2;
}
ci = ++c->ci;
*ci = ci_zero;
ci->epos = mrb->c->eidx;
ci->ridx = ridx;
ci->env = 0;
ci->pc = 0;
ci->err = 0;
ci->proc = 0;
ci->acc = 0;
return ci;
}
......
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