mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-12 04:11:18 -08:00
slot-exists-p now works with structures
This commit is contained in:
parent
43b76fb00e
commit
bcbf783688
1 changed files with 9 additions and 0 deletions
|
|
@ -66,6 +66,15 @@
|
|||
(princ ")" stream)
|
||||
obj))
|
||||
|
||||
(defmethod slot-exists-p ((obj structure-object) slot-name)
|
||||
(let ((class (si:instance-class obj)))
|
||||
;(declare (type structure-class class))
|
||||
;; FIXME! NIL could, in principle, be valid slot name. We reject it here
|
||||
;; because DEFSTRUCT uses this name to mark padding slots for initial-offset.
|
||||
(and slot-name
|
||||
(member slot-name (slot-value class 'slots) :key #'slotd-name)
|
||||
t)))
|
||||
|
||||
;;; ======================================================================
|
||||
;;; Built-in classes
|
||||
;;; ----------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue