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
commit0f1ea0a977d6d0306164857352d819cf081eabda (patch)
tree31867fb362443b10e2ee79ff5b9e034b099050f1 /lib.c
parentabe23a3de41d0155fd4bdebff54279b13da7299c (diff)
downloadtxr-0f1ea0a977d6d0306164857352d819cf081eabda.tar.gz
txr-0f1ea0a977d6d0306164857352d819cf081eabda.tar.bz2
txr-0f1ea0a977d6d0306164857352d819cf081eabda.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 */