debug print might cause segv

This commit is contained in:
Yuichi Nishiwaki 2013-12-09 09:09:24 -08:00
parent eeb09f336e
commit 39b28fa674
1 changed files with 6 additions and 1 deletions

View File

@ -286,7 +286,12 @@ macroexpand(pic_state *pic, pic_value expr, struct pic_senv *senv)
it = xh_begin(lib->exports); it = xh_begin(lib->exports);
while (! xh_isend(&it)) { while (! xh_isend(&it)) {
#if DEBUG #if DEBUG
printf("* importing %s as %s\n", it.e->key, pic_symbol_name(pic, (pic_sym)it.e->val)); if (it.e->val >= 0) {
printf("* importing %s as %s\n", it.e->key, pic_symbol_name(pic, (pic_sym)it.e->val));
}
else {
printf("* importing %s\n", it.e->key);
}
#endif #endif
if (it.e->val >= 0) { if (it.e->val >= 0) {
xh_put(pic->lib->senv->tbl, it.e->key, it.e->val); xh_put(pic->lib->senv->tbl, it.e->key, it.e->val);