From 3bfcc3e86717b571fc8a15c36eca61338be4da63 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Mon, 27 Oct 2008 22:58:17 +0100 Subject: [PATCH] The slot reader that we define may be used for slots that are redefined to have allocation :class --- src/clos/standard.lsp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/clos/standard.lsp b/src/clos/standard.lsp index 09023f355..b8ba97a06 100644 --- a/src/clos/standard.lsp +++ b/src/clos/standard.lsp @@ -537,8 +537,9 @@ because it contains a reference to the undefined class~% ~A" (table (slot-table class)) (slotd (gethash slot-name table)) (index (slot-definition-location slotd)) - (value (si:instance-ref self index))) - (declare (fixnum index)) + (value (if (si::fixnump index) + (si:instance-ref self (the fixnum index)) + (car (the cons index))))) (if (si:sl-boundp value) value (values (slot-unbound (class-of self) self slot-name))))) @@ -547,8 +548,9 @@ because it contains a reference to the undefined class~% ~A" (table (slot-table class)) (slotd (gethash slot-name table)) (index (slot-definition-location slotd))) - (declare (fixnum index)) - (si:instance-set self index value)))))) + (if (fixnump index) + (si:instance-set self (the fixnum index) value) + (rplaca (the cons index) value))))))) (defun std-class-sealed-accessors (index) (declare (si::c-local)