renamed symbols must be always greater than or equal to 0

This commit is contained in:
Yuichi Nishiwaki 2014-03-25 13:26:42 +09:00
parent e74f700c51
commit 514937662e
1 changed files with 4 additions and 8 deletions

View File

@ -119,14 +119,10 @@ pic_import(pic_state *pic, pic_value spec)
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",
pic_symbol_name(pic, (long)it.e->key),
pic_symbol_name(pic, it.e->val));
}
else {
printf("* importing %s\n", pic_symbol_name(pic, (long)it.e->key));
}
assert(it.e->val >= 0);
printf("* importing %s as %s\n",
pic_symbol_name(pic, (long)it.e->key),
pic_symbol_name(pic, it.e->val));
#endif
xh_put_int(pic->lib->senv->name, (long)it.e->key, it.e->val);