diff --git a/include/picrin/macro.h b/include/picrin/macro.h index e34b63c6..cc50550b 100644 --- a/include/picrin/macro.h +++ b/include/picrin/macro.h @@ -11,7 +11,7 @@ extern "C" { struct pic_senv { PIC_OBJECT_HEADER - xhash *name; + xhash *renames; struct pic_senv *up; }; diff --git a/src/gc.c b/src/gc.c index 2d42ade6..6c8d23e7 100644 --- a/src/gc.c +++ b/src/gc.c @@ -604,7 +604,7 @@ gc_finalize_object(pic_state *pic, struct pic_object *obj) } case PIC_TT_SENV: { struct pic_senv *senv = (struct pic_senv *)obj; - xh_destroy(senv->name); + xh_destroy(senv->renames); break; } case PIC_TT_MACRO: { diff --git a/src/macro.c b/src/macro.c index 7a5cb6a3..da316770 100644 --- a/src/macro.c +++ b/src/macro.c @@ -25,7 +25,7 @@ pic_put_rename(pic_state *pic, struct pic_senv *senv, pic_sym sym, pic_sym renam { UNUSED(pic); - xh_put_int(senv->name, sym, rename); + xh_put_int(senv->renames, sym, rename); } pic_sym @@ -35,7 +35,7 @@ pic_find_rename(pic_state *pic, struct pic_senv *senv, pic_sym sym) UNUSED(pic); - if ((e = xh_get_int(senv->name, sym)) == NULL) { + if ((e = xh_get_int(senv->renames, sym)) == NULL) { return 0; } return e->val; @@ -51,7 +51,7 @@ senv_new(pic_state *pic, struct pic_senv *up) senv = (struct pic_senv *)pic_obj_alloc(pic, sizeof(struct pic_senv), PIC_TT_SENV); senv->up = up; - senv->name = xh_new_int(); + senv->renames = xh_new_int(); return senv; }