From 18dddca25db701d49aea1e678c856e6602b9b8ab Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 6 Nov 2014 21:37:12 -0800 Subject: * lib.c (sub, ref, refset, replace, update, search_list): Fix cut and paste problem: type_mismatch argument expression referring to the C function cons rather than the intended object seq. --- ChangeLog | 7 +++++++ lib.c | 12 ++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b68b18f1..e8a16758 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-11-06 Kaz Kylheku + + * lib.c (sub, ref, refset, replace, update, search_list): + Fix cut and paste problem: type_mismatch argument expression + referring to the C function cons rather than the intended + object seq. + 2014-11-06 Kaz Kylheku * eval.c (eval_init): Register chand intrinsic. diff --git a/lib.c b/lib.c index 3c828d14..a06dfa7e 100644 --- a/lib.c +++ b/lib.c @@ -5992,7 +5992,7 @@ val sub(val seq, val from, val to) case VEC: return sub_vec(seq, from, to); default: - type_mismatch(lit("sub: ~s is not a sequence"), cons, nao); + type_mismatch(lit("sub: ~s is not a sequence"), seq, nao); } } @@ -6011,7 +6011,7 @@ val ref(val seq, val ind) case VEC: return vecref(seq, ind); default: - type_mismatch(lit("ref: ~s is not a sequence"), cons, nao); + type_mismatch(lit("ref: ~s is not a sequence"), seq, nao); } } @@ -6029,7 +6029,7 @@ val refset(val seq, val ind, val newval) case VEC: return set(vecref_l(seq, ind), newval); default: - type_mismatch(lit("ref: ~s is not a sequence"), cons, nao); + type_mismatch(lit("ref: ~s is not a sequence"), seq, nao); } return newval; } @@ -6048,7 +6048,7 @@ val replace(val seq, val items, val from, val to) case VEC: return replace_vec(seq, items, from, to); default: - type_mismatch(lit("replace: ~s is not a sequence"), cons, nao); + type_mismatch(lit("replace: ~s is not a sequence"), seq, nao); } } @@ -6084,7 +6084,7 @@ val update(val seq, val fun) return hash_update(seq, fun); /* fallthrough */ default: - type_mismatch(lit("replace: ~s is not a sequence"), cons, nao); + type_mismatch(lit("replace: ~s is not a sequence"), seq, nao); } return seq; @@ -6127,7 +6127,7 @@ static val search_list(val seq, val key, val testfun, val keyfun) } break; default: - type_mismatch(lit("search: ~s is not a sequence"), cons, nao); + type_mismatch(lit("search: ~s is not a sequence"), seq, nao); } return nil; -- cgit v1.2.3