bugfix: do not rewind arena_index up to before pic_try

This commit is contained in:
Yuichi Nishiwaki 2017-04-01 18:57:24 +09:00
parent 99c269e7ea
commit f7ab0a9cd6
2 changed files with 2 additions and 1 deletions

View File

@ -730,6 +730,7 @@ pic_read(pic_state *pic, pic_value port)
reader_init(pic, &p);
pic_try {
size_t ai = pic_enter(pic);
while ((c = skip(pic, port, next(pic, port))) != EOF) {
val = read_nullable(pic, port, c, &p);

View File

@ -193,7 +193,7 @@ pic_alloca(pic_state *pic, size_t n)
{
static const pic_data_type t = { "pic_alloca", pic_free };
return pic_data(pic, pic_data_value(pic, pic_malloc(pic, n), &t)); /* TODO optimize */
return pic_data(pic, pic_data_value(pic, pic_malloc(pic, n), &t));
}
/* MARK */