From 9f505d37d5ff7de3a139d2b8bc07507c3c245a45 Mon Sep 17 00:00:00 2001 From: wlott <wlott> Date: Sat, 22 May 1993 21:17:58 +0000 Subject: [PATCH] Only interpose a weak-pointer between the hash-table-bucket-key and the real key if the hash table is supposed to be weak. --- code/hash.lisp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/hash.lisp b/code/hash.lisp index ca25e7077..79b7f1432 100644 --- a/code/hash.lisp +++ b/code/hash.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash.lisp,v 1.23 1993/05/17 21:22:23 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/hash.lisp,v 1.24 1993/05/22 21:17:58 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -570,7 +570,9 @@ (if eq-based (make-hash-table-bucket :hash nil - :key (make-weak-pointer key) + :key (if (hash-table-weak-p hash-table) + (make-weak-pointer key) + key) :value value :next first-bucket) (make-hash-table-bucket @@ -582,7 +584,9 @@ (if eq-based (let ((bucket (make-hash-table-eq-bucket :hash hashing - :key (make-weak-pointer key) + :key (if (hash-table-weak-p hash-table) + (make-weak-pointer key) + key) :value value :next first-bucket :linked t))) -- GitLab