From 312914fa0d1051fd595fcaa387cd31910d8ca318 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Wed, 6 Aug 2014 15:02:19 +0900 Subject: [PATCH] use #, reader literal to write eof-object --- src/write.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/write.c b/src/write.c index 0d558f35..aac56071 100644 --- a/src/write.c +++ b/src/write.c @@ -198,6 +198,9 @@ write_core(struct writer_control *p, pic_value obj) } switch (pic_type(obj)) { + case PIC_TT_UNDEF: + xfprintf(file, "#"); + break; case PIC_TT_NIL: xfprintf(file, "()"); break; @@ -266,10 +269,7 @@ write_core(struct writer_control *p, pic_value obj) xfprintf(file, "%d", pic_int(obj)); break; case PIC_TT_EOF: - xfprintf(file, "#"); - break; - case PIC_TT_UNDEF: - xfprintf(file, "#"); + xfprintf(file, "#,(eof-object)"); break; case PIC_TT_STRING: if (p->mode == DISPLAY_MODE) {