summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-01-18 06:49:18 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-01-18 06:49:18 -0800
commit1043bad18b114590c78d1db804339a457fd37d96 (patch)
treec9ba41b193b049af975bce1774f6ac6bd2da9d5f
parent166927780f449e7b0c77345cad3150684d42d150 (diff)
downloadtxr-1043bad18b114590c78d1db804339a457fd37d96.tar.gz
txr-1043bad18b114590c78d1db804339a457fd37d96.tar.bz2
txr-1043bad18b114590c78d1db804339a457fd37d96.zip
Relax input type constraint in vec-list.
* lib.c (vec_list): Don't require input to be specifically a list, just any sequence that can be marched with cdr until nil. This commit also fixes the problem that the error message was still referring to the function as vector-list.
-rw-r--r--lib.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib.c b/lib.c
index e6aa748e..817f9449 100644
--- a/lib.c
+++ b/lib.c
@@ -5965,10 +5965,7 @@ val vec_list(val list)
{
val vec = vector(zero, nil);
- if (!listp(list))
- uw_throwf(error_s, lit("vector-list: list expected, not ~s"), list, nao);
-
- for (; consp(list); list = cdr(list))
+ for (; list; list = cdr(list))
vec_push(vec, car(list));
return vec;