Source
(defmethod rucksack-remove-slot-index (rucksack class slot &key (errorp nil))
(unless (symbolp class)
(setq class (class-name class)))
(unless (symbolp slot)
(setq slot (slot-definition-name slot)))
(flet ((oops (error)
(declare (ignore error))
(simple-rucksack-error "Attempt to remove non-existing slot
index for slot ~S of class ~S in ~S."
slot
class
rucksack)))
;; Return the slot name if everything went fine; otherwise, return
;; NIL (or signal an error).
(and (handler-bind ((btree-search-error #'oops))
(let ((slot-index-table (btree-search (slot-index-tables rucksack) class
:errorp errorp)))
(and slot-index-table
(handler-bind ((btree-deletion-error #'oops))
(btree-delete-key slot-index-table slot
:if-does-not-exist (if errorp :error :ignore))))))
slot)))
Source Context