diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-01-02 03:08:53 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-01-02 03:08:53 -0800 |
commit | 98de650e7e61d719dd4f97232539fe32fe5e0bce (patch) | |
tree | 9c373224122a1da61500c0fa7c0f7f2e57b24afc | |
parent | 1561d1cce8137e1957e4333740034ce02455c6bf (diff) | |
download | txr-98de650e7e61d719dd4f97232539fe32fe5e0bce.tar.gz txr-98de650e7e61d719dd4f97232539fe32fe5e0bce.tar.bz2 txr-98de650e7e61d719dd4f97232539fe32fe5e0bce.zip |
seq_info: bugfix: wrong object tested obj_struct_p.
* lib.c (seq_info): The obj_struct_p test must be applied to
obj, not to cls, which is a symbol. Due to this bug, seq_info
would always report struct-based sequences as SEQ_NOTSEQ.
-rw-r--r-- | lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -302,7 +302,7 @@ seq_info_t seq_info(val obj) ret.kind = SEQ_HASHLIKE; } else if (cls == carray_s) { ret.kind = SEQ_VECLIKE; - } else if (obj_struct_p(cls)) { + } else if (obj_struct_p(obj)) { if (maybe_slot(obj, length_s)) ret.kind = SEQ_VECLIKE; if (maybe_slot(obj, car_s)) |