summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-11 08:15:16 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-11 08:15:16 -0700
commit2deb1846c43a3deea56be09d90705504aaa29184 (patch)
tree31867fb362443b10e2ee79ff5b9e034b099050f1 /lib.c
parente73d2c1da4c80f33b8184b8646199eb47dbb7edf (diff)
downloadtxr-2deb1846c43a3deea56be09d90705504aaa29184.tar.gz
txr-2deb1846c43a3deea56be09d90705504aaa29184.tar.bz2
txr-2deb1846c43a3deea56be09d90705504aaa29184.zip
length function supports carray.
* lib.c (length): Handle COBJ of carray type. * txr.1: Documented.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 4cb28c73..56cbf4ae 100644
--- a/lib.c
+++ b/lib.c
@@ -9131,6 +9131,8 @@ val length(val seq)
case COBJ:
if (seq->co.cls == hash_s)
return hash_count(seq);
+ if (seq->co.cls == carray_s)
+ return length_carray(seq);
if (structp(seq) && maybe_slot(seq, car_s))
return length_proper_list(nullify(seq));
/* fallthrough */