diff --git a/include/picrin.h b/include/picrin.h index d194de1f..8522ef5b 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -100,6 +100,8 @@ typedef struct { pic_value lib_tbl; struct pic_lib *lib; + xhash rlabels; + jmp_buf *jmp; struct pic_error *err; struct pic_jmpbuf *try_jmps; diff --git a/src/state.c b/src/state.c index a9a13ba8..61cd2f41 100644 --- a/src/state.c +++ b/src/state.c @@ -64,6 +64,9 @@ pic_open(int argc, char *argv[], char **envp) pic->lib_tbl = pic_nil_value(); pic->lib = NULL; + /* reader */ + xh_init_int(&pic->rlabels, sizeof(pic_value)); + /* error handling */ pic->jmp = NULL; pic->err = NULL; @@ -154,6 +157,7 @@ pic_close(pic_state *pic) xh_destroy(&pic->syms); xh_destroy(&pic->global_tbl); xh_destroy(&pic->macros); + xh_destroy(&pic->rlabels); /* free GC arena */ free(pic->arena);