From 00fc0ee93192dfd73a23d7523d258db10b7836e6 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Thu, 21 Nov 2013 06:31:32 -0800 Subject: [PATCH] protect more objects during expansion --- src/expand.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/expand.c b/src/expand.c index 0cc5f8b9..f847e507 100644 --- a/src/expand.c +++ b/src/expand.c @@ -45,6 +45,8 @@ expand(pic_state *pic, pic_value obj, struct syntactic_env *env) int ai = pic_gc_arena_preserve(pic); #if DEBUG + printf("current ai = %d\n", ai); + printf("expanding..."); pic_debug(pic, obj); puts(""); @@ -130,6 +132,7 @@ expand(pic_state *pic, pic_value obj, struct syntactic_env *env) pic_gc_arena_restore(pic, ai); pic_gc_protect(pic, v); + pic_gc_protect(pic, obj); } v = pic_reverse(pic, v);