(when slot
(let* ((inits (cdr slot))
(sname (car slot))
- (stable (fintern "~A-VALUES" sname))
+ (stable (fintern "~A-VALUES" sname))
(stype (getf inits :type))
(reader (or (getf inits :accessor)
(getf inits :reader)
(defmethod ,writer ((object ,type) value)
(declare (type ,stype value))
(setf (gethash object ,stable) value))
- ;; For Python compatibility
- (defmethod get-extension ((object ,type) (slot (eql ',sname)))
- (gethash object ,stable ,default))
- (defmethod set-extension ((object ,type) (slot (eql ',sname)) value)
- (setf (gethash object ,stable) value))
- (defmethod has-extension ((object ,type) (slot (eql ',sname)))
- (multiple-value-bind (value foundp)
- (gethash object ,stable ,default)
- (declare (ignore value))
- foundp))
- (defmethod clear-extension ((object ,type) (slot (eql ',sname)))
- (remhash object ,stable))
+ ;; For Python compatibility
+ (defmethod get-extension ((object ,type) (slot (eql ',sname)))
+ (values (gethash object ,stable ,default)))
+ (defmethod set-extension ((object ,type) (slot (eql ',sname)) value)
+ (setf (gethash object ,stable) value))
+ (defmethod has-extension ((object ,type) (slot (eql ',sname)))
+ (multiple-value-bind (value foundp)
+ (gethash object ,stable ,default)
+ (declare (ignore value))
+ foundp))
+ (defmethod clear-extension ((object ,type) (slot (eql ',sname)))
+ (remhash object ,stable))
(defsetf ,reader ,writer))))
;; This so that (de)serialization works
(setf (proto-reader field) reader