diff --git a/include/picrin.h b/include/picrin.h index f4b7f529..08f01796 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -94,12 +94,12 @@ typedef struct { pic_sym sADD, sSUB, sMUL, sDIV, sMINUS; pic_sym sEQ, sLT, sLE, sGT, sGE, sNOT; - struct xhash *sym_tbl; + xhash *sym_tbl; const char **sym_pool; size_t slen, scapa; int uniq_sym_count; - struct xhash *global_tbl; + xhash *global_tbl; pic_value *globals; size_t glen, gcapa; diff --git a/include/picrin/lib.h b/include/picrin/lib.h index 3d85cf1a..85812788 100644 --- a/include/picrin/lib.h +++ b/include/picrin/lib.h @@ -13,7 +13,7 @@ struct pic_lib { PIC_OBJECT_HEADER pic_value name; struct pic_senv *senv; - struct xhash *exports; + xhash *exports; }; #define pic_lib_ptr(o) ((struct pic_lib *)pic_ptr(o)) diff --git a/include/picrin/macro.h b/include/picrin/macro.h index b02ebf11..3b2f4ab9 100644 --- a/include/picrin/macro.h +++ b/include/picrin/macro.h @@ -13,7 +13,7 @@ struct pic_senv { PIC_OBJECT_HEADER struct pic_senv *up; /* positive for variables, negative for macros (bitwise-not) */ - struct xhash *tbl; + xhash *tbl; struct pic_syntax **stx; size_t xlen, xcapa; }; diff --git a/src/codegen.c b/src/codegen.c index af10e92a..9352807f 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -80,7 +80,7 @@ typedef struct analyze_scope { bool varg; int argc, localc; /* if variable v is captured, then xh_get(var_tbl, v) == 1 */ - struct xhash *var_tbl; + xhash *var_tbl; pic_sym *vars; struct analyze_scope *up; @@ -103,7 +103,7 @@ static void pop_scope(analyze_state *); } while (0) #define register_renamed_symbol(pic, state, slot, lib, name) do { \ - struct xh_entry *e; \ + xh_entry *e; \ if (! (e = xh_get_int(lib->senv->tbl, pic_intern_cstr(pic, name)))) \ pic_error(pic, "internal error! native VM procedure not found"); \ state->slot = e->val; \ @@ -113,8 +113,8 @@ static analyze_state * new_analyze_state(pic_state *pic) { analyze_state *state; - struct xhash *global_tbl; - struct xh_iter it; + xhash *global_tbl; + xh_iter it; struct pic_lib *stdlib; state = (analyze_state *)pic_alloc(pic, sizeof(analyze_state)); @@ -204,7 +204,7 @@ static int lookup_var(analyze_state *state, pic_sym sym) { analyze_scope *scope = state->scope; - struct xh_entry *e; + xh_entry *e; int depth = 0; enter: @@ -667,7 +667,7 @@ typedef struct resolver_scope { int depth; bool varg; int argc, localc; - struct xhash *cvs, *lvs; + xhash *cvs, *lvs; unsigned cv_num; struct resolver_scope *up; @@ -768,7 +768,7 @@ static pic_value resolve_gref(resolver_state *state, pic_sym sym) { pic_state *pic = state->pic; - struct xh_entry *e; + xh_entry *e; size_t i; if ((e = xh_get_int(pic->global_tbl, sym))) { @@ -981,7 +981,7 @@ push_codegen_context(codegen_state *state, pic_value args, pic_value locals, boo pic_state *pic = state->pic; codegen_context *cxt; int i, c; - struct xhash *vars; + xhash *vars; cxt = (codegen_context *)pic_alloc(pic, sizeof(codegen_context)); cxt->up = state->cxt; @@ -1438,7 +1438,7 @@ pic_compile(pic_state *pic, pic_value obj) static int scope_global_define(pic_state *pic, pic_sym sym) { - struct xh_entry *e; + xh_entry *e; if ((e = xh_get_int(pic->global_tbl, sym))) { pic_warn(pic, "redefining global"); @@ -1474,7 +1474,7 @@ pic_define(pic_state *pic, const char *name, pic_value val) static int global_ref(pic_state *pic, const char *name) { - struct xh_entry *e; + xh_entry *e; pic_sym sym; sym = pic_intern_cstr(pic, name); diff --git a/src/macro.c b/src/macro.c index 78936281..818e8921 100644 --- a/src/macro.c +++ b/src/macro.c @@ -181,7 +181,7 @@ void pic_import(pic_state *pic, pic_value spec) { struct pic_lib *lib; - struct xh_iter it; + xh_iter it; lib = pic_find_library(pic, spec); if (! lib) { @@ -218,7 +218,7 @@ pic_import(pic_state *pic, pic_value spec) void pic_export(pic_state *pic, pic_sym sym) { - struct xh_entry *e; + xh_entry *e; e = xh_get_int(pic->lib->senv->tbl, sym); if (! e) { @@ -272,7 +272,7 @@ macroexpand(pic_state *pic, pic_value expr, struct pic_senv *senv) return macroexpand(pic, sc->expr, sc->senv); } case PIC_TT_SYMBOL: { - struct xh_entry *e; + xh_entry *e; pic_sym uniq; if (! pic_interned_p(pic, pic_sym(expr))) { diff --git a/src/symbol.c b/src/symbol.c index 816e72bc..4ed5ba04 100644 --- a/src/symbol.c +++ b/src/symbol.c @@ -13,7 +13,7 @@ pic_sym pic_intern_cstr(pic_state *pic, const char *str) { - struct xh_entry *e; + xh_entry *e; pic_sym id; e = xh_get(pic->sym_tbl, str);