From 3d3b539edd815d4025435ca35e5e0324923d6db2 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Wed, 7 Apr 2010 15:24:54 +0000 Subject: [PATCH] 1.0.37.52: better MAKE-HASH-TABLE :WEAKNESS documentation Thanks to Attila Lendvai and Nathan Froyd. --- src/code/target-hash-table.lisp | 29 +++++++++++++++++++---------- version.lisp-expr | 2 +- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/code/target-hash-table.lisp b/src/code/target-hash-table.lisp index a9bcc87..27b7322 100644 --- a/src/code/target-hash-table.lisp +++ b/src/code/target-hash-table.lisp @@ -258,16 +258,25 @@ Examples: HASH-FUNCTION is expected to return a non-negative fixnum hash code. :WEAKNESS - If NIL (the default) it is a normal non-weak hash table. If one - of :KEY, :VALUE, :KEY-AND-VALUE, :KEY-OR-VALUE it is a weak hash table. - Depending on the type of weakness the lack of references to the key and - the value may allow for removal of the entry. If WEAKNESS is :KEY and the - key would otherwise be garbage the entry is eligible for removal from the - hash table. Similarly, if WEAKNESS is :VALUE the life of an entry depends - on its value's references. If WEAKNESS is :KEY-AND-VALUE and either the - key or the value would otherwise be garbage the entry can be removed. If - WEAKNESS is :KEY-OR-VALUE and both the key and the value would otherwise - be garbage the entry can be removed. + When :WEAKNESS is not NIL, garbage collection may remove entries from the + hash table. The value of :WEAKNESS specifies how the presence of a key or + value in the hash table preserves their entries from garbage collection. + + Valid values are: + + :KEY means that the key of an entry must be live to guarantee that the + entry is preserved. + + :VALUE means that the value of an entry must be live to guarantee that + the entry is preserved. + + :KEY-AND-VALUE means that both the key and the value must be live to + guarantee that the entry is preserved. + + :KEY-OR-VALUE means that either the key or the value must be live to + guarantee that the entry is preserved. + + NIL (the default) means that entries are always preserved. :SYNCHRONIZED If NIL (the default), the hash-table may have multiple concurrent readers, diff --git a/version.lisp-expr b/version.lisp-expr index f61f0e3..9306020 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.37.51" +"1.0.37.52" -- 1.7.10.4