use newer API of xhash
This commit is contained in:
parent
208fa63699
commit
c5c3f4c1f5
|
@ -146,7 +146,7 @@ new_analyze_state(pic_state *pic)
|
|||
push_scope(state, pic_nil_value());
|
||||
|
||||
global_tbl = pic->global_tbl;
|
||||
for (it = xh_begin(global_tbl); ! xh_isend(&it); xh_next(global_tbl, &it)) {
|
||||
for (xh_begin(global_tbl, &it); ! xh_isend(&it); xh_next(&it)) {
|
||||
xh_put(state->scope->var_tbl, it.e->key, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -186,8 +186,7 @@ pic_import(pic_state *pic, pic_value spec)
|
|||
if (! lib) {
|
||||
pic_error(pic, "library not found");
|
||||
}
|
||||
it = xh_begin(lib->exports);
|
||||
while (! xh_isend(&it)) {
|
||||
for (xh_begin(lib->exports, &it); ! xh_isend(&it); xh_next(&it)) {
|
||||
#if DEBUG
|
||||
if (it.e->val >= 0) {
|
||||
printf("* importing %s as %s\n", it.e->key, pic_symbol_name(pic, (pic_sym)it.e->val));
|
||||
|
@ -212,7 +211,6 @@ pic_import(pic_state *pic, pic_value spec)
|
|||
xh_put(senv->tbl, it.e->key, ~idx);
|
||||
senv->xlen++;
|
||||
}
|
||||
xh_next(lib->exports, &it);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue