diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-06-06 21:14:42 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-06-06 21:14:42 -0700 |
commit | 8834f7473ae41435c77fee1684685c4f71cbbe9d (patch) | |
tree | d8fdfabc9959c7bbc1225121e80e66cf47111dc5 /lib.c | |
parent | f91a1c23bc13b93b9e084173b2377d6124c6469a (diff) | |
download | txr-8834f7473ae41435c77fee1684685c4f71cbbe9d.tar.gz txr-8834f7473ae41435c77fee1684685c4f71cbbe9d.tar.bz2 txr-8834f7473ae41435c77fee1684685c4f71cbbe9d.zip |
Handle sequence structs in toseq.
* lib.c (toseq): Handle OBJP case, and
implement behavior for struct objects that
have a car method.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -691,6 +691,10 @@ val toseq(val seq) case CONS: case LCONS: return nullify(seq); + case COBJ: + if (structp(seq) && maybe_slot(seq, car_s)) + return nullify(seq); + /* fallthrough */ default: return cons(seq, nil); } |