summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vm.c13
-rw-r--r--vm_eval.c2
2 files changed, 7 insertions, 8 deletions
diff --git a/vm.c b/vm.c
index 8eb02f3d84..a84320b4e3 100644
--- a/vm.c
+++ b/vm.c
@@ -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;
diff --git a/vm_eval.c b/vm_eval.c
index b53f9bc0f1..6b38d40d93 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -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);