From ac6ebdfb32d4b197f2f7994eb3bc6b200531a5b5 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Fri, 9 May 2003 15:19:19 +0000 Subject: [PATCH] * src/pcl/init.lisp (shared-initialize): Initialize shared slots from initfunction only if slot-names is t or if the slot is among slot-names. Thanks to Christophe Rhodes. --- pcl/init.lisp | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/pcl/init.lisp b/pcl/init.lisp index 2f3a23d7b..7214d0b5e 100644 --- a/pcl/init.lisp +++ b/pcl/init.lisp @@ -26,7 +26,7 @@ ;;; (file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/init.lisp,v 1.22 2003/05/04 13:11:21 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/init.lisp,v 1.23 2003/05/09 15:19:19 gerd Exp $") ;;; ;;; This file defines the initialization and related protocols. @@ -160,18 +160,12 @@ (unless (null initfn) (setf (slot-value-using-class class instance slotd) (funcall initfn)))))))) - (let* ((class (class-of instance)) - (initfn-slotds - (loop for slotd in (class-slots class) - unless (initialize-slot-from-initarg class instance slotd) - collect slotd))) - (dolist (slotd initfn-slotds) - (if (eq (slot-definition-allocation slotd) :class) - (unless (slot-boundp-using-class 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))))) + (let ((class (class-of instance))) + (dolist (slotd (class-slots class)) + (unless (initialize-slot-from-initarg class instance slotd) + (when (or (eq slot-names t) + (memq (slot-definition-name slotd) slot-names)) + (initialize-slot-from-initfunction class instance slotd))))) instance))) -- GitLab