From 8834f7473ae41435c77fee1684685c4f71cbbe9d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 6 Jun 2016 21:14:42 -0700 Subject: Handle sequence structs in toseq. * lib.c (toseq): Handle OBJP case, and implement behavior for struct objects that have a car method. --- lib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib.c b/lib.c index 3e245e40..29d11ef9 100644 --- a/lib.c +++ b/lib.c @@ -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); } -- cgit v1.2.3