klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 64b64193bb2de53e4e69ea6bd8e497e9171b3240
parent d65b05eb1552ca832e519b5d1f4bc9f93526bbca
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri,  8 Jul 2011 17:37:41 -0300

Added write support for blobs.

Diffstat:
Msrc/Makefile | 2+-
Msrc/kwrite.c | 10++++++++++
2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile @@ -245,7 +245,7 @@ ktoken.o: ktoken.c ktoken.h kobject.h klimits.h klisp.h klispconf.h \ kwrite.o: kwrite.c kwrite.h kobject.h klimits.h klisp.h klispconf.h \ kstate.h ktoken.h kmem.h kinteger.h imath.h krational.h imrat.h kreal.h \ kpair.h kgc.h kstring.h ksymbol.h kerror.h ktable.h kport.h \ - kenvironment.h + kenvironment.h kblob.h imath.o: imath.c imath.h kobject.h klimits.h klisp.h klispconf.h kstate.h \ ktoken.h kmem.h kerror.h imrat.o: imrat.c imrat.h imath.h kobject.h klimits.h klisp.h klispconf.h \ diff --git a/src/kwrite.c b/src/kwrite.c @@ -23,6 +23,7 @@ #include "ktable.h" #include "kport.h" #include "kenvironment.h" +#include "kblob.h" /* ** Stack for the write FSM @@ -442,6 +443,15 @@ void kwrite_simple(klisp_State *K, TValue obj) kw_printf(K, "]"); break; } + case K_TBLOB: + kw_printf(K, "#[blob"); + #if KTRACK_NAMES + if (khas_name(obj)) { + kw_print_name(K, obj); + } + #endif + kw_printf(K, "]"); + break; default: /* shouldn't happen */ kwrite_error(K, "unknown object type");