load_stdlib releases arena objects every time evaluating exprssion

This commit is contained in:
Yuichi Nishiwaki 2013-11-21 06:30:33 -08:00
parent 6581177ec5
commit f146287eff
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,7 @@ pic_load_stdlib(pic_state *pic)
{
static const char *fn = "piclib/built-in.scm";
FILE *file;
int n, i;
int n, i, ai;
pic_value v, vs;
struct pic_proc *proc;
@ -41,6 +41,7 @@ pic_load_stdlib(pic_state *pic)
abort();
}
ai = pic_gc_arena_preserve(pic);
for (i = 0; i < n; ++i, vs = pic_cdr(pic, vs)) {
v = pic_car(pic, vs);
@ -57,6 +58,8 @@ pic_load_stdlib(pic_state *pic)
fputs("fatal error: built-in.scm evaluation failure", stderr);
abort();
}
pic_gc_arena_restore(pic, ai);
}
#if DEBUG