s/num_val/valuec/g

This commit is contained in:
Yuichi Nishiwaki 2013-11-04 16:07:36 -05:00
parent c24560de12
commit d0602303e3
4 changed files with 6 additions and 6 deletions

View File

@ -11,7 +11,7 @@
struct pic_code; struct pic_code;
typedef struct pic_callinfo { typedef struct {
int argc; int argc;
struct pic_code *pc; struct pic_code *pc;
pic_value *fp; pic_value *fp;

View File

@ -4,7 +4,7 @@
struct pic_env { struct pic_env {
PIC_OBJECT_HEADER PIC_OBJECT_HEADER
pic_value *values; pic_value *values;
int num_val; int valuec;
struct pic_env *up; struct pic_env *up;
}; };

View File

@ -159,7 +159,7 @@ gc_mark_object(pic_state *pic, struct pic_object *obj)
struct pic_env *env = (struct pic_env *)obj; struct pic_env *env = (struct pic_env *)obj;
int i; int i;
for (i = 0; i < env->num_val; ++i) { for (i = 0; i < env->valuec; ++i) {
gc_mark(pic, env->values[i]); gc_mark(pic, env->values[i]);
} }
if (env->up) { if (env->up) {

View File

@ -370,9 +370,9 @@ pic_apply(pic_state *pic, struct pic_proc *proc, pic_value argv)
/* prepare env */ /* prepare env */
ci->env = (struct pic_env *)pic_obj_alloc(pic, sizeof(struct pic_env), PIC_TT_ENV); ci->env = (struct pic_env *)pic_obj_alloc(pic, sizeof(struct pic_env), PIC_TT_ENV);
ci->env->up = proc->env; ci->env->up = proc->env;
ci->env->num_val = proc->u.irep->argc + proc->u.irep->localc; ci->env->valuec = proc->u.irep->argc + proc->u.irep->localc;
ci->env->values = (pic_value *)pic_calloc(pic, ci->env->num_val, sizeof(pic_value)); ci->env->values = (pic_value *)pic_calloc(pic, ci->env->valuec, sizeof(pic_value));
for (i = 0; i < ci->env->num_val; ++i) { for (i = 0; i < ci->env->valuec; ++i) {
ci->env->values[i] = ci->fp[i]; ci->env->values[i] = ci->fp[i];
} }