X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fpcl%2Fslot-name.lisp;h=b7150c28e40224ceb8e469824b7c282a84b81f91;hb=9eec6e12fb6d22101631158dc1012276fd00facc;hp=1ad1c7311efd70c1e3501b9f97a22e6324c7fb49;hpb=6c129930bd75f25a66aa0cbf0e5bc8091401d5ce;p=sbcl.git diff --git a/src/pcl/slot-name.lisp b/src/pcl/slot-name.lisp index 1ad1c73..b7150c2 100644 --- a/src/pcl/slot-name.lisp +++ b/src/pcl/slot-name.lisp @@ -23,29 +23,12 @@ (in-package "SB-PCL") -(defmacro slot-symbol (slot-name type) - `(if (and (symbolp ,slot-name) (symbol-package ,slot-name)) - (or (get ,slot-name ',(ecase type - (reader 'reader-symbol) - (writer 'writer-symbol) - (boundp 'boundp-symbol))) - (intern (format nil "~A ~A slot ~A" - (package-name (symbol-package ,slot-name)) - (symbol-name ,slot-name) - ,(symbol-name type)) - *slot-accessor-name-package*)) - (progn - (error "Non-symbol and non-interned symbol slot name accessors~ - are not yet implemented.") - ;;(make-symbol (format nil "~A ~A" ,slot-name ,type)) - ))) +(defun slot-reader-name (slot-name) + (list 'slot-accessor :global slot-name 'reader)) -(defun slot-reader-symbol (slot-name) - (slot-symbol slot-name reader)) +(defun slot-writer-name (slot-name) + (list 'slot-accessor :global slot-name 'writer)) -(defun slot-writer-symbol (slot-name) - (slot-symbol slot-name writer)) - -(defun slot-boundp-symbol (slot-name) - (slot-symbol slot-name boundp)) +(defun slot-boundp-name (slot-name) + (list 'slot-accessor :global slot-name 'boundp))