From: Russ Tyndall Date: Thu, 9 Jun 2011 18:04:47 +0000 (-0400) Subject: allow update-record-from-slots to accept slot names or slot X-Git-Tag: v6.0.0~4^2~25 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=e336ab9b5b48fe3f28737386eded4c8f897e25f6 allow update-record-from-slots to accept slot names or slot definitions (by improving slotdef-for-slot-with-class) --- 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)