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;
typedef struct pic_callinfo {
typedef struct {
int argc;
struct pic_code *pc;
pic_value *fp;

View File

@ -4,7 +4,7 @@
struct pic_env {
PIC_OBJECT_HEADER
pic_value *values;
int num_val;
int valuec;
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;
int i;
for (i = 0; i < env->num_val; ++i) {
for (i = 0; i < env->valuec; ++i) {
gc_mark(pic, env->values[i]);
}
if (env->up) {

View File

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