From 5b15790a3b93ea3b787fed6adec78ac0229670a2 Mon Sep 17 00:00:00 2001 From: gerd <gerd> Date: Mon, 28 Apr 2003 15:18:49 +0000 Subject: [PATCH] * src/pcl/slots-boot.lisp (ensure-accessor): Initialize the slot's entry in *name->class->slotd-table* in case the load-time-value is executed before initialize-internal-slot-functions had a chance to run. --- pcl/slots-boot.lisp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pcl/slots-boot.lisp b/pcl/slots-boot.lisp index b5846ba7e..f6dedd536 100644 --- a/pcl/slots-boot.lisp +++ b/pcl/slots-boot.lisp @@ -26,7 +26,7 @@ ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/slots-boot.lisp,v 1.19 2003/04/25 17:43:50 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/slots-boot.lisp,v 1.20 2003/04/28 15:18:49 gerd Exp $") ;;; (in-package :pcl) @@ -95,11 +95,18 @@ slot-name))))) (unless (fboundp gf-name) (let ((gf (ensure-generic-function gf-name))) + ;; + ;; Initialize this here, In case the LOAD-TIME-VALUE is + ;; executed before INITIALIZE-INTERNAL-SLOT-FUNCTIONS had a + ;; chance to run. + (unless (gethash slot-name *name->class->slotd-table*) + (setf (gethash slot-name *name->class->slotd-table*) + (make-hash-table :test 'eq))) + (setf (plist-value gf 'slot-missing-method) t) (ecase type (reader (add-slot-missing-method gf slot-name 'slot-value)) (boundp (add-slot-missing-method gf slot-name 'slot-boundp)) - (writer (add-slot-missing-method gf slot-name 'setf))) - (setf (plist-value gf 'slot-missing-method) t)) + (writer (add-slot-missing-method gf slot-name 'setf))))) t))) (defmacro accessor-slot-value (object slot-name) -- GitLab