stop warning in macroexpand, and creating a duplicate slot
This commit is contained in:
parent
fd0553ac25
commit
c4040949ff
|
@ -496,12 +496,12 @@ macroexpand(pic_state *pic, pic_value expr, struct pic_senv *senv)
|
|||
if (! pic_sym_p(var)) {
|
||||
pic_error(pic, "binding to non-symbol object");
|
||||
}
|
||||
/* do not make duplicate variable slot*/
|
||||
if (xh_get_int(senv->tbl, pic_sym(var)) == NULL) {
|
||||
uniq = pic_gensym(pic, pic_sym(var));
|
||||
if (xh_get_int(senv->tbl, pic_sym(var)) != NULL) {
|
||||
pic_warn(pic, "redefining variable");
|
||||
}
|
||||
xh_put_int(senv->tbl, pic_sym(var), (int)uniq);
|
||||
}
|
||||
}
|
||||
FALLTHROUGH;
|
||||
case PIC_STX_SET:
|
||||
case PIC_STX_IF:
|
||||
|
|
Loading…
Reference in New Issue