diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-22 14:35:36 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-04-22 14:35:36 +0900 |
| commit | 5513fcee22ceab9293bff7815f961616c1fa3e83 (patch) | |
| tree | 917ae5efe1eff1f8b56342ba822137f9f450419c /src/kernel.c | |
| parent | 3b0a36d3993ff6c553b171c8bcb0e703a471ef5e (diff) | |
| download | mruby-5513fcee22ceab9293bff7815f961616c1fa3e83.tar.gz mruby-5513fcee22ceab9293bff7815f961616c1fa3e83.zip | |
Keep reference to mrb_context from env; fix #3619
Diffstat (limited to 'src/kernel.c')
| -rw-r--r-- | src/kernel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel.c b/src/kernel.c index ce304fd99..c1300ed70 100644 --- a/src/kernel.c +++ b/src/kernel.c @@ -158,7 +158,7 @@ mrb_f_block_given_p_m(mrb_state *mrb, mrb_value self) ci = 0; /* no callinfo available */ } else { - ci = mrb->c->cibase + e->cioff; + ci = e->cxt.c->cibase + e->cioff; bp = ci[1].stackent + 1; } } @@ -1165,8 +1165,8 @@ mrb_local_variables(mrb_state *mrb, mrb_value self) while (e) { if (MRB_ENV_STACK_SHARED_P(e) && - !MRB_PROC_CFUNC_P(mrb->c->cibase[e->cioff].proc)) { - irep = mrb->c->cibase[e->cioff].proc->body.irep; + !MRB_PROC_CFUNC_P(e->cxt.c->cibase[e->cioff].proc)) { + irep = e->cxt.c->cibase[e->cioff].proc->body.irep; if (irep->lv) { for (i = 0; i + 1 < irep->nlocals; ++i) { if (irep->lv[i].name) { |
