[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


In AKCL 123 and greater there is  a bug in the sharp reader for structs.
This will be fixed when Schelter returns. If anyone needs a fix now, the
following patch will work


(in-package 'si)

(defun sharp-s-reader (stream subchar arg)
  (declare (ignore subchar))
  (when (and arg (null *read-suppress*))
        (error "An extra argument was supplied for the #S readmacro."))
  (let ((l (read stream)))
    (unless (get (car l) 's-data)
            (error "~S is not a structure." (car l)))
    ;; Intern keywords in the keyword package.
    (do ((ll (cdr l) (cddr ll)))
        ((endp ll)
         ;; Find an appropriate construtor.
         (do ((cs (si::s-data-constructors
		   (get (car l) 'si::s-data)) (cdr cs)))
             ((endp cs)
              (error "The structure ~S has no structure constructor."
                     (car l)))
           (when (symbolp (car cs))
                 (return (apply (car cs) (cdr l))))))
      (rplaca ll (intern (string (car ll)) 'keyword)))))


Mike B