From b25e08a3328ffa4bf29a8a8651973d88ae79b90c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 18 Oct 2016 05:39:48 -0700 Subject: New function to access slot list of struct type. * struct.c (slots): New function. * struct.h (slots): Declared. --- struct.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 559dbb0e..54631098 100644 --- a/struct.c +++ b/struct.c @@ -1085,6 +1085,12 @@ val static_slot_p(val type, val sym) return nil; } +val slots(val stype) +{ + struct struct_type *st = stype_handle(&stype, lit("static-slot-p")); + return st->slots; +} + val structp(val obj) { return tnil(cobjp(obj) && obj->co.ops == &struct_inst_ops); -- cgit v1.2.3