use khash for pic->syms

This commit is contained in:
Yuichi Nishiwaki
2015-06-25 07:05:41 +09:00
parent 03a649ed23
commit 0fb87449fc
4 changed files with 36 additions and 22 deletions
+3 -1
View File
@@ -48,6 +48,8 @@ typedef struct pic_state pic_state;
#include "picrin/read.h"
#include "picrin/gc.h"
KHASH_DECLARE(s, const char *, pic_sym *);
typedef struct pic_checkpoint {
PIC_OBJECT_HEADER
struct pic_proc *in;
@@ -125,7 +127,7 @@ struct pic_state {
pic_value features;
xhash syms; /* name to symbol */
khash_t(s) syms; /* name to symbol */
int ucnt;
struct pic_dict *globals;
struct pic_dict *macros;