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 | 2264eda279ffbbfee97f80cda56db19b8c359072 (patch) | |
tree | 9c373224122a1da61500c0fa7c0f7f2e57b24afc | |
parent | c1f589db75f669bcd6c4bb0671fb1d71eb0d5e5a (diff) | |
download | txr-2264eda279ffbbfee97f80cda56db19b8c359072.tar.gz txr-2264eda279ffbbfee97f80cda56db19b8c359072.tar.bz2 txr-2264eda279ffbbfee97f80cda56db19b8c359072.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)) |