diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-14 17:36:36 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-07-14 17:36:36 +0000 |
commit | 3f473f88984bc8aff76af1cdbe4b61a578a92cd3 (patch) | |
tree | f9a07e80f9287ecd81ab7b17f5382d6645491215 /proc.c | |
parent | 05b88b65e17e702d576cfe24548c215c8199fc17 (diff) | |
download | ruby-3f473f88984bc8aff76af1cdbe4b61a578a92cd3.tar.gz |
* 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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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); } /* |