X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fdefstruct.lisp;h=52880e82bfc9eea219b5b3762d378bfefe04ac76;hb=2abf77f6c4c559a3e5b7fc351a4743305381feb6;hp=ca7e4672c78c98a8b717a7ff01561625d4715b45;hpb=8fc5fda05f92d69c95b47e4ad7561d91dab18c3e;p=sbcl.git diff --git a/src/code/defstruct.lisp b/src/code/defstruct.lisp index ca7e467..52880e8 100644 --- a/src/code/defstruct.lisp +++ b/src/code/defstruct.lisp @@ -11,9 +11,6 @@ ;;;; files for more information. (in-package "SB!KERNEL") - -(file-comment - "$Header$") ;;;; getting LAYOUTs @@ -153,7 +150,7 @@ (intern (string (dsd-%name dsd)) (if (dsd-accessor dsd) (symbol-package (dsd-accessor dsd)) - *package*))) + (sane-package)))) ;;;; typed (non-class) structures @@ -593,7 +590,7 @@ spec)) (when (find name (dd-slots defstruct) :test #'string= :key #'dsd-%name) - (error 'program-error + (error 'simple-program-error :format-control "duplicate slot name ~S" :format-arguments (list name))) (setf (dsd-%name islot) (string name)) @@ -1231,10 +1228,10 @@ (%delayed-get-compiler-layout ,(dd-name defstruct))) ,@(when n-raw-data `((setf (%instance-ref ,temp ,raw-index) ,n-raw-data))) - ,@(mapcar #'(lambda (dsd value) - (multiple-value-bind (accessor index data) - (slot-accessor-form defstruct dsd temp n-raw-data) - `(setf (,accessor ,data ,index) ,value))) + ,@(mapcar (lambda (dsd value) + (multiple-value-bind (accessor index data) + (slot-accessor-form defstruct dsd temp n-raw-data) + `(setf (,accessor ,data ,index) ,value))) (dd-slots defstruct) values) ,temp)))) @@ -1272,7 +1269,7 @@ defstruct (dd-default-constructor defstruct) (arglist) (vals) (types) (vals)))) -;;; Given a structure and a BOA constructor spec, call Creator with +;;; Given a structure and a BOA constructor spec, call CREATOR with ;;; the appropriate args to make a constructor. (defun create-boa-constructor (defstruct boa creator) (multiple-value-bind (req opt restp rest keyp keys allowp aux)