[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
qualifier are non-nil-atoms bug
- To: CommonLoops.pa@Xerox.COM
- Subject: qualifier are non-nil-atoms bug
- From: kanderso@DINO.BBN.COM
- Date: Tue, 28 Mar 89 16:58:05 -0500
- Cc: kanderson@DINO.BBN.COM
- Redistributed: CommonLoops.pa
Here are to simple patches. The clos spec says qualifiers are non-nil-atoms
but PCL used SYMBOLP rather than ATOM.
;;; Patch 3600-low.lisp
(si:define-function-spec-handler method (op spec &optional arg1 arg2)
(if (eq op 'sys:validate-function-spec)
(and (let ((gspec (cadr spec)))
(or (symbolp gspec)
(and (listp gspec)
(eq (car gspec) 'setf)
(symbolp (cadr gspec))
(null (cddr gspec)))))
(let ((tail (cddr spec)))
(loop (cond ((null tail) (return nil))
((listp (car tail)) (return t))
((atom (pop tail)))
(t (return nil))))))
(let ((meth (and (listp spec)
(and (fboundp 'generic-function-p)
(generic-function-p #'add-method))
(multiple-value-bind (ignore method)
(parse-method-or-spec (cdr spec) nil)
method))))
(method-definition-handler-1 op spec meth arg1 arg2))))
;;; patch BOOT.LISP
(defun parse-defmethod (cdr-of-form)
(declare (values name qualifiers specialized-lambda-list body))
(let ((name (pop cdr-of-form))
(qualifiers ())
(spec-ll ()))
(loop (if (and (car cdr-of-form) (atom (car cdr-of-form)))
(push (pop cdr-of-form) qualifiers)
(return (setq qualifiers (nreverse qualifiers)))))
(setq spec-ll (pop cdr-of-form))
(values name qualifiers spec-ll cdr-of-form)))