From baeb5f6174515c0e35bc9d9af9665a3dc9bf0536 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sat, 19 Jul 2014 01:37:57 +0900 Subject: [PATCH] s/senv->renames/senv->map/g --- include/picrin/macro.h | 2 +- src/gc.c | 2 +- src/macro.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/picrin/macro.h b/include/picrin/macro.h index 023c2785..758c6298 100644 --- a/include/picrin/macro.h +++ b/include/picrin/macro.h @@ -11,7 +11,7 @@ extern "C" { struct pic_senv { PIC_OBJECT_HEADER - xhash renames; + xhash map; struct pic_senv *up; }; diff --git a/src/gc.c b/src/gc.c index d77393c8..7d285b32 100644 --- a/src/gc.c +++ b/src/gc.c @@ -623,7 +623,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->renames); + xh_destroy(&senv->map); break; } case PIC_TT_MACRO: { diff --git a/src/macro.c b/src/macro.c index 964a9589..91da8b00 100644 --- a/src/macro.c +++ b/src/macro.c @@ -26,7 +26,7 @@ pic_put_rename(pic_state *pic, struct pic_senv *senv, pic_sym sym, pic_sym renam { UNUSED(pic); - xh_put_int(&senv->renames, sym, &rename); + xh_put_int(&senv->map, sym, &rename); } bool @@ -41,7 +41,7 @@ pic_find_rename(pic_state *pic, struct pic_senv *senv, pic_sym sym, pic_sym *ren return true; } - if ((e = xh_get_int(&senv->renames, sym)) == NULL) { + if ((e = xh_get_int(&senv->map, sym)) == NULL) { return false; } if (rename != NULL) { @@ -212,7 +212,7 @@ macroexpand_lambda(pic_state *pic, pic_value expr, struct pic_senv *senv) in = (struct pic_senv *)pic_obj_alloc(pic, sizeof(struct pic_senv), PIC_TT_SENV); in->up = senv; - xh_init_int(&in->renames, sizeof(pic_sym)); + xh_init_int(&in->map, sizeof(pic_sym)); for (a = pic_cadr(pic, expr); pic_pair_p(a); a = pic_cdr(pic, a)) { pic_value v = pic_car(pic, a); @@ -374,7 +374,7 @@ macroexpand_let_syntax(pic_state *pic, pic_value expr, struct pic_senv *senv) in = (struct pic_senv *)pic_obj_alloc(pic, sizeof(struct pic_senv), PIC_TT_SENV); in->up = senv; - xh_init_int(&in->renames, sizeof(pic_sym)); + xh_init_int(&in->map, sizeof(pic_sym)); if (pic_length(pic, expr) < 2) { pic_error(pic, "syntax error"); @@ -569,7 +569,7 @@ pic_null_syntactic_environment(pic_state *pic) senv = (struct pic_senv *)pic_obj_alloc(pic, sizeof(struct pic_senv), PIC_TT_SENV); senv->up = NULL; - xh_init_int(&senv->renames, sizeof(pic_sym)); + xh_init_int(&senv->map, sizeof(pic_sym)); pic_define_syntactic_keyword(pic, senv, pic->sDEFINE_LIBRARY, pic->rDEFINE_LIBRARY); pic_define_syntactic_keyword(pic, senv, pic->sIMPORT, pic->rIMPORT);