mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
vm.c (uvenv): move declaration to initialization
This commit is contained in:
@@ -222,13 +222,12 @@ static inline struct REnv*
|
||||
uvenv(mrb_state *mrb, mrb_int up)
|
||||
{
|
||||
const struct RProc *proc = mrb->c->ci->proc;
|
||||
struct REnv *e;
|
||||
|
||||
while (up--) {
|
||||
proc = proc->upper;
|
||||
if (!proc) return NULL;
|
||||
}
|
||||
e = MRB_PROC_ENV(proc);
|
||||
struct REnv *e = MRB_PROC_ENV(proc);
|
||||
if (e) return e; /* proc has enclosed env */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user