From e336ab9b5b48fe3f28737386eded4c8f897e25f6 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Thu, 9 Jun 2011 14:04:47 -0400 Subject: [PATCH] allow update-record-from-slots to accept slot names or slot definitions (by improving slotdef-for-slot-with-class) --- sql/metaclasses.lisp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sql/metaclasses.lisp b/sql/metaclasses.lisp index 6ee6d4d..81a430c 100644 --- a/sql/metaclasses.lisp +++ b/sql/metaclasses.lisp @@ -573,8 +573,11 @@ implementations." result)) (defun slotdef-for-slot-with-class (slot class) - (find-if #'(lambda (d) (eql slot (slot-definition-name d))) - (class-slots class))) + (typecase slot + (standard-slot-definition slot) + (symbol + (find-if #'(lambda (d) (eql slot (slot-definition-name d))) + (class-slots class))))) #+ignore (eval-when (:compile-toplevel :load-toplevel :execute) -- 2.34.1