Skip to content
Snippets Groups Projects
Commit f97a81e9 authored by ram's avatar ram
Browse files

Fixed #S and removed a residual reference to the STRUCTURE type.

parent 76342a1e
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sharpm.lisp,v 1.10.1.1 1993/01/23 13:43:47 ram Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/sharpm.lisp,v 1.10.1.2 1993/02/11 14:00:59 ram Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -213,27 +213,22 @@ ...@@ -213,27 +213,22 @@
(let ((body (if (char= (read-char stream t) #\( ) (let ((body (if (char= (read-char stream t) #\( )
(read-list stream nil) (read-list stream nil)
(%reader-error stream "Non-list following #S")))) (%reader-error stream "Non-list following #S"))))
(cond ((listp body) (unless (listp body)
(unless (symbolp (car body)) (%reader-error stream "Non-list following #S: ~S" body))
(%reader-error stream (unless (symbolp (car body))
"Structure type is not a symbol: ~S" (car body))) (%reader-error stream "Structure type is not a symbol: ~S" (car body)))
(let ((defstruct (info type defined-structure-info (car body)))) (let ((class (find-class (car body) nil)))
(unless defstruct (unless (typep class 'structure-class)
(%reader-error stream (%reader-error stream "~S is not a defined structure type."
"~S is not a defined structure type." (car body)))
(car body))) (let ((def-con (dd-default-constructor
(unless (c::dd-constructors defstruct) (layout-info
(%reader-error (class-layout class)))))
stream "The ~S structure does not have a default constructor." (unless def-con
(car body))) (%reader-error
(do ((arg (cdr body) (cddr arg)) stream "The ~S structure does not have a default constructor."
(res ())) (car body)))
((endp arg) (apply (fdefinition def-cont) (rest body))))))
(apply (car (c::dd-constructors defstruct)) res))
(push (cadr arg) res)
(push (intern (string (car arg)) *keyword-package*) res))))
(t (%reader-error stream "Non-list following #S: ~S" body)))))
;;;; #=/## ;;;; #=/##
...@@ -247,7 +242,7 @@ ...@@ -247,7 +242,7 @@
;; alist of the things to be replaced assoc'd with the things to replace them. ;; alist of the things to be replaced assoc'd with the things to replace them.
;; ;;
(defun circle-subst (old-new-alist tree) (defun circle-subst (old-new-alist tree)
(cond ((not (typep tree '(or cons (array t) structure))) (cond ((not (typep tree '(or cons (array t) structure-object)))
(let ((entry (find tree old-new-alist :key #'second))) (let ((entry (find tree old-new-alist :key #'second)))
(if entry (third entry) tree))) (if entry (third entry) tree)))
((null (gethash tree *sharp-equal-circle-table*)) ((null (gethash tree *sharp-equal-circle-table*))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment