klisp

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

commit 42e8a2aef70f3cec076dfb429951711f98a2ec0f
parent c1f532881cb95602cd305a9987f2582eb62d31a4
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri,  8 Jul 2011 18:29:32 -0300

Added equal? support for blobs.

Diffstat:
Msrc/Makefile | 2+-
Msrc/kgequalp.c | 6++++++
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/Makefile b/src/Makefile @@ -151,7 +151,7 @@ kgeqp.o: kgeqp.c kstate.h klimits.h klisp.h kobject.h klispconf.h \ kapplicative.h koperative.h kenvironment.h ksymbol.h kstring.h kgeqp.h \ kinteger.h imath.h krational.h imrat.h kgequalp.o: kgequalp.c kstate.h klimits.h klisp.h kobject.h klispconf.h \ - ktoken.h kmem.h kpair.h kgc.h kstring.h kcontinuation.h kerror.h \ + ktoken.h kmem.h kpair.h kgc.h kstring.h kblob.h kcontinuation.h kerror.h \ kghelpers.h kapplicative.h koperative.h kenvironment.h ksymbol.h kgeqp.h \ kinteger.h imath.h krational.h imrat.h kgequalp.h kghelpers.o: kghelpers.c kghelpers.h kstate.h klimits.h klisp.h kobject.h \ diff --git a/src/kgequalp.c b/src/kgequalp.c @@ -14,6 +14,7 @@ #include "kobject.h" #include "kpair.h" #include "kstring.h" /* for kstring_equalp */ +#include "kblob.h" /* for kblob_equalp */ #include "kcontinuation.h" #include "kerror.h" @@ -196,6 +197,11 @@ bool equal2p(klisp_State *K, TValue obj1, TValue obj2) result = false; break; } + } else if (ttisblob(obj1) && ttisblob(obj2)) { + if (!kblob_equalp(obj1, obj2)) { + result = false; + break; + } } else { result = false; break;