summaryrefslogtreecommitdiffhomepage
path: root/src/proc.c
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2014-04-01 01:13:39 +0900
committertake_cheeze <[email protected]>2014-04-01 01:13:39 +0900
commit80534b6d14f1392ab1c199f0906880d61f55ae84 (patch)
tree45b37a1013bf60faa4190525fb791725185ce480 /src/proc.c
parentd7c29322b8fea584cb8940b9d216b9e11bdf94f9 (diff)
downloadmruby-80534b6d14f1392ab1c199f0906880d61f55ae84.tar.gz
mruby-80534b6d14f1392ab1c199f0906880d61f55ae84.zip
Use MRB_ENV_STACK_LEN instead of accessing `flags` directly to get REnv's stack length.
Diffstat (limited to 'src/proc.c')
-rw-r--r--src/proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/proc.c b/src/proc.c
index 4e6e2b95f..0dfc3f818 100644
--- a/src/proc.c
+++ b/src/proc.c
@@ -41,7 +41,7 @@ closure_setup(mrb_state *mrb, struct RProc *p, int nlocals)
if (!mrb->c->ci->env) {
e = (struct REnv*)mrb_obj_alloc(mrb, MRB_TT_ENV, (struct RClass*)mrb->c->ci->proc->env);
- e->flags= (unsigned int)nlocals;
+ MRB_ENV_STACK_LEN(e)= (unsigned int)nlocals;
e->mid = mrb->c->ci->mid;
e->cioff = mrb->c->ci - mrb->c->cibase;
e->stack = mrb->c->stack;