aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeddy <[email protected]>2013-08-12 20:41:54 +0800
committerTeddy <[email protected]>2013-08-12 20:41:54 +0800
commit5b8200390713bbffa95e38a5d610fc631a7ebd9c (patch)
tree51e754c14695042327306dde1c88bd3b93da3ece
parentb525cc4808cbbe68132e5941187030d3dd38abc2 (diff)
rectified some typo in string-related built-ins
-rw-r--r--builtin.cpp4
-rw-r--r--eval.cpp2
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<StrObj*>(obj1)->lt(static_cast<StrObj*>(obj2)));
+ return new BoolObj(static_cast<StrObj*>(obj1)->gt(static_cast<StrObj*>(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<StrObj*>(obj1)->le(static_cast<StrObj*>(obj2)));
+ return new BoolObj(static_cast<StrObj*>(obj1)->ge(static_cast<StrObj*>(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_lt);
ADD_BUILTIN_PROC("string<=?", string_le);
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);