From 5b8200390713bbffa95e38a5d610fc631a7ebd9c Mon Sep 17 00:00:00 2001 From: Teddy Date: Mon, 12 Aug 2013 20:41:54 +0800 Subject: rectified some typo in string-related built-ins --- builtin.cpp | 4 ++-- eval.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/builtin.cpp b/builtin.cpp index 760aa2a..8d3e21d 100644 --- a/builtin.cpp +++ b/builtin.cpp @@ -1248,7 +1248,7 @@ BUILTIN_PROC_DEF(string_gt) { EvalObj *obj2 = TO_PAIR(args->cdr)->car; if (!obj1->is_str_obj() || !obj2->is_str_obj()) throw TokenError("a string", RUN_ERR_WRONG_TYPE); - return new BoolObj(static_cast(obj1)->lt(static_cast(obj2))); + return new BoolObj(static_cast(obj1)->gt(static_cast(obj2))); } BUILTIN_PROC_DEF(string_ge) { @@ -1257,7 +1257,7 @@ BUILTIN_PROC_DEF(string_ge) { EvalObj *obj2 = TO_PAIR(args->cdr)->car; if (!obj1->is_str_obj() || !obj2->is_str_obj()) throw TokenError("a string", RUN_ERR_WRONG_TYPE); - return new BoolObj(static_cast(obj1)->le(static_cast(obj2))); + return new BoolObj(static_cast(obj1)->ge(static_cast(obj2))); } BUILTIN_PROC_DEF(string_eq) { diff --git a/eval.cpp b/eval.cpp index 2deb38c..2f5921d 100644 --- a/eval.cpp +++ b/eval.cpp @@ -80,7 +80,7 @@ void Evaluator::add_builtin_routines() { ADD_BUILTIN_PROC("string?", string_gt); - ADD_BUILTIN_PROC("string<=?", string_ge); + ADD_BUILTIN_PROC("string>=?", string_ge); ADD_BUILTIN_PROC("string=?", string_eq); ADD_BUILTIN_PROC("make-vector", make_vector); -- cgit v1.2.3-70-g09d2