summaryrefslogtreecommitdiff
path: root/proc.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-14 17:36:36 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-14 17:36:36 +0000
commite07dad00ee37173a990cc8d4f147963d7f57a28c (patch)
treef9a07e80f9287ecd81ab7b17f5382d6645491215 /proc.c
parentaf4cbc4fe0eb0c8cec4f1ed4b6194b9cd700021e (diff)
* vm_core.h, vm.c: remvoe rb_env_t::prev_envval because we can know it
via env->ep. rb_vm_env_prev_envval(env) returns prev_envval via env->ep. * vm_core.h (rb_vm_env_local_variables): change parameter type from VALUE (T_DATA/env) to `const rb_env_t *' to make same as rb_vm_env_prev_envval(). * proc.c: catch up these changes. * vm_dump.c: ditto. * vm.c: rename macros. * ENV_IN_HEAP_P() to VM_EP_IN_HEAP_P() because it uses ep. * ENV_VAL() to VM_ENV_EP_ENVVAL() because it is too short. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'proc.c')
-rw-r--r--proc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/proc.c b/proc.c
index a95cd2a..1405c19 100644
--- a/proc.c
+++ b/proc.c
@@ -379,7 +379,7 @@ get_local_variable_ptr(VALUE envval, ID lid)
else {
return NULL;
}
- } while ((envval = env->prev_envval) != 0);
+ } while ((envval = rb_vm_env_prev_envval(env)) != Qfalse);
return NULL;
}
@@ -432,9 +432,12 @@ static VALUE
bind_local_variables(VALUE bindval)
{
const rb_binding_t *bind;
+ const rb_env_t *env;
GetBindingPtr(bindval, bind);
- return rb_vm_env_local_variables(bind->env);
+ GetEnvPtr(bind->env, env);
+
+ return rb_vm_env_local_variables(env);
}
/*