Skip to content
Snippets Groups Projects
Commit 0d97bc11 authored by gerd's avatar gerd
Browse files

Test case SHARED-INITIALIZE.5.1 from Paul Dietz.

	SHARED-INITIALIZE being specified to initialize slots that are
	unbound, including class slots.

	* src/pcl/init.lisp (shared-initialize): Initialize class
	slots that are unbound.
parent c0613a70
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/init.lisp,v 1.19 2003/04/23 17:38:59 gerd Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/init.lisp,v 1.20 2003/05/02 12:43:06 gerd Exp $")
;;; ;;;
;;; This file defines the initialization and related protocols. ;;; This file defines the initialization and related protocols.
...@@ -164,11 +164,13 @@ ...@@ -164,11 +164,13 @@
(loop for slotd in (class-slots class) (loop for slotd in (class-slots class)
unless (initialize-slot-from-initarg class instance slotd) unless (initialize-slot-from-initarg class instance slotd)
collect slotd))) collect slotd)))
(loop for slotd in initfn-slotds (dolist (slotd initfn-slotds)
when (and (not (eq :class (slot-definition-allocation slotd))) (if (eq (slot-definition-allocation slotd) :class)
(or (eq t slot-names) (unless (slot-boundp-using-class class instance slotd)
(memq (slot-definition-name slotd) slot-names))) do (initialize-slot-from-initfunction class instance slotd))
(initialize-slot-from-initfunction class instance slotd))) (when (or (eq t slot-names)
(memq (slot-definition-name slotd) slot-names))
(initialize-slot-from-initfunction class instance slotd)))))
instance))) instance)))
......
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