s/lib_tbl/libs/g
This commit is contained in:
parent
dbad3690af
commit
2f7f2a5b93
|
@ -71,6 +71,8 @@ typedef struct {
|
|||
|
||||
pic_code *ip;
|
||||
|
||||
struct pic_lib *lib;
|
||||
|
||||
pic_sym sDEFINE, sLAMBDA, sIF, sBEGIN, sQUOTE, sSETBANG;
|
||||
pic_sym sQUASIQUOTE, sUNQUOTE, sUNQUOTE_SPLICING;
|
||||
pic_sym sDEFINE_SYNTAX;
|
||||
|
@ -90,9 +92,7 @@ typedef struct {
|
|||
|
||||
xhash globals;
|
||||
xhash macros;
|
||||
|
||||
pic_value lib_tbl;
|
||||
struct pic_lib *lib;
|
||||
pic_value libs;
|
||||
|
||||
xhash rlabels;
|
||||
|
||||
|
|
2
src/gc.c
2
src/gc.c
|
@ -594,7 +594,7 @@ gc_mark_phase(pic_state *pic)
|
|||
}
|
||||
|
||||
/* library table */
|
||||
gc_mark(pic, pic->lib_tbl);
|
||||
gc_mark(pic, pic->libs);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -35,7 +35,7 @@ pic_make_library(pic_state *pic, pic_value name)
|
|||
xh_init_int(&lib->exports, sizeof(pic_sym));
|
||||
|
||||
/* register! */
|
||||
pic->lib_tbl = pic_acons(pic, name, pic_obj_value(lib), pic->lib_tbl);
|
||||
pic->libs = pic_acons(pic, name, pic_obj_value(lib), pic->libs);
|
||||
|
||||
return lib;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ pic_find_library(pic_state *pic, pic_value spec)
|
|||
{
|
||||
pic_value v;
|
||||
|
||||
v = pic_assoc(pic, spec, pic->lib_tbl, NULL);
|
||||
v = pic_assoc(pic, spec, pic->libs, NULL);
|
||||
if (pic_false_p(v)) {
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ pic_open(int argc, char *argv[], char **envp)
|
|||
xh_init_int(&pic->macros, sizeof(struct pic_macro *));
|
||||
|
||||
/* libraries */
|
||||
pic->lib_tbl = pic_nil_value();
|
||||
pic->libs = pic_nil_value();
|
||||
pic->lib = NULL;
|
||||
|
||||
/* reader */
|
||||
|
@ -162,7 +162,7 @@ pic_close(pic_state *pic)
|
|||
pic->arena_idx = 0;
|
||||
pic->err = NULL;
|
||||
xh_clear(&pic->macros);
|
||||
pic->lib_tbl = pic_nil_value();
|
||||
pic->libs = pic_nil_value();
|
||||
|
||||
/* free all heap objects */
|
||||
pic_gc_run(pic);
|
||||
|
|
Loading…
Reference in New Issue