From 411395995cb688fed0ec71a97f8248db399ad9bf Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 24 Oct 2013 03:41:48 +0900 Subject: [PATCH] s/env.numcv/env.num_val/g --- include/picrin/proc.h | 2 +- src/gc.c | 2 +- src/vm.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/picrin/proc.h b/include/picrin/proc.h index c29b6c36..b51b9a53 100644 --- a/include/picrin/proc.h +++ b/include/picrin/proc.h @@ -4,7 +4,7 @@ struct pic_env { PIC_OBJECT_HEADER pic_value *values; - int numcv; + int num_val; struct pic_env *up; }; diff --git a/src/gc.c b/src/gc.c index 13e5ecb8..48e2b3ca 100644 --- a/src/gc.c +++ b/src/gc.c @@ -163,7 +163,7 @@ gc_mark_object(pic_state *pic, struct pic_object *obj) struct pic_env *env = (struct pic_env *)obj; int i; - for (i = 0; i < env->numcv; ++i) { + for (i = 0; i < env->num_val; ++i) { gc_mark(pic, env->values[i]); } gc_mark_object(pic, (struct pic_object *)env->up); diff --git a/src/vm.c b/src/vm.c index 1e2bb2b3..ae8494ee 100644 --- a/src/vm.c +++ b/src/vm.c @@ -280,8 +280,8 @@ pic_run(pic_state *pic, struct pic_proc *proc, pic_value args) struct pic_env *env; env = (struct pic_env *)pic_obj_alloc(pic, sizeof(struct pic_env), PIC_TT_ENV); - env->numcv = pic->irep[pc->u.i]->argc; - env->values = (pic_value *)pic_alloc(pic, sizeof(pic_value) * env->numcv); + env->num_val = pic->irep[pc->u.i]->argc; + env->values = (pic_value *)pic_alloc(pic, sizeof(pic_value) * env->num_val); env->up = pic_proc_ptr(*pic->ci->fp)->env; proc = pic_proc_new(pic, pic->irep[pc->u.i], env);