diff options
-rw-r--r-- | vm.c | 13 | ||||
-rw-r--r-- | vm_eval.c | 2 |
2 files changed, 7 insertions, 8 deletions
@@ -453,8 +453,8 @@ check_env_value(VALUE envval) } static VALUE -vm_make_env_each(rb_thread_t * const th, rb_control_frame_t * const cfp, - VALUE *envptr, VALUE * const endptr) +vm_make_env_each(const rb_thread_t *const th, rb_control_frame_t *const cfp, + VALUE *envptr, const VALUE *const endptr) { VALUE envval, penvval = 0; rb_env_t *env; @@ -532,7 +532,7 @@ vm_make_env_each(rb_thread_t * const th, rb_control_frame_t * const cfp, } static int -collect_local_variables_in_iseq(rb_iseq_t *iseq, const struct local_var_list *vars) +collect_local_variables_in_iseq(const rb_iseq_t *iseq, const struct local_var_list *vars) { int i; if (!iseq) return 0; @@ -542,19 +542,18 @@ collect_local_variables_in_iseq(rb_iseq_t *iseq, const struct local_var_list *va return 1; } -static int -collect_local_variables_in_env(rb_env_t *env, const struct local_var_list *vars) +static void +collect_local_variables_in_env(const rb_env_t *env, const struct local_var_list *vars) { while (collect_local_variables_in_iseq(env->block.iseq, vars), env->prev_envval) { GetEnvPtr(env->prev_envval, env); } - return 0; } static int -vm_collect_local_variables_in_heap(rb_thread_t *th, VALUE *ep, const struct local_var_list *vars) +vm_collect_local_variables_in_heap(rb_thread_t *th, const VALUE *ep, const struct local_var_list *vars) { if (ENV_IN_HEAP_P(th, ep)) { rb_env_t *env; @@ -22,7 +22,7 @@ static inline VALUE vm_yield_with_block(rb_thread_t *th, int argc, const VALUE * static NODE *vm_cref_push(rb_thread_t *th, VALUE klass, int noex, rb_block_t *blockptr); static VALUE vm_exec(rb_thread_t *th); static void vm_set_eval_stack(rb_thread_t * th, VALUE iseqval, const NODE *cref, rb_block_t *base_block); -static int vm_collect_local_variables_in_heap(rb_thread_t *th, VALUE *dfp, const struct local_var_list *vars); +static int vm_collect_local_variables_in_heap(rb_thread_t *th, const VALUE *dfp, const struct local_var_list *vars); /* vm_backtrace.c */ VALUE rb_vm_backtrace_str_ary(rb_thread_t *th, int lev, int n); |