aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2004-02-17 00:47:11 +0000
committerRichard M. Stallman2004-02-17 00:47:11 +0000
commit2c6d3eef11acac0a260c00b98bde7410b9ea94c7 (patch)
tree180bc897aad99e6ac98a30f2ab1019f5900c4e19
parent0fe5963523fd53826a281f97fd3b19fbec0f93d6 (diff)
downloademacs-2c6d3eef11acac0a260c00b98bde7410b9ea94c7.tar.gz
emacs-2c6d3eef11acac0a260c00b98bde7410b9ea94c7.zip
(Creating Hash): Correct and clarify doc of WEAK values.
-rw-r--r--lispref/hash.texi20
1 files changed, 10 insertions, 10 deletions
diff --git a/lispref/hash.texi b/lispref/hash.texi
index 909c7fb0b7c..3c4cb4df19c 100644
--- a/lispref/hash.texi
+++ b/lispref/hash.texi
@@ -109,19 +109,19 @@ values from being collected as garbage (if they are not referenced
109anywhere else); if a particular value does get collected, the 109anywhere else); if a particular value does get collected, the
110corresponding association is removed from the hash table. 110corresponding association is removed from the hash table.
111 111
112If @var{weak} is @code{key-or-value} or @code{t}, the hash table does 112If @var{weak} is @code{key-and-value} or @code{t}, both the key and
113not protect either keys or values from garbage collection; if either 113the value must be live in order to preserve the association. Thus,
114one is collected as garbage, the association is removed. 114the hash table does not protect either keys or values from garbage
115collection; if either one is collected as garbage, that removes the
116association.
115 117
116If @var{weak} is @code{key-and-value}, associations are removed from 118If @var{weak} is @code{key-or-value}, either the key or
117the hash table when both their key and value would be collected as 119the value can preserve the association. Thus, associations are
118garbage, again not considering references to the key and value from 120removed from the hash table when both their key and value would be
119weak hash tables. 121collected as garbage (if not for references from weak hash tables).
120 122
121The default for @var{weak} is @code{nil}, so that all keys and values 123The default for @var{weak} is @code{nil}, so that all keys and values
122referenced in the hash table are preserved from garbage collection. If 124referenced in the hash table are preserved from garbage collection.
123@var{weak} is @code{t}, neither keys nor values are protected (that is,
124both are weak).
125 125
126@item :size @var{size} 126@item :size @var{size}
127This specifies a hint for how many associations you plan to store in the 127This specifies a hint for how many associations you plan to store in the