summaryrefslogtreecommitdiff
path: root/lispref/hash.texi
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2004-02-17 00:47:11 +0000
committerRichard M. Stallman <rms@gnu.org>2004-02-17 00:47:11 +0000
commit1fcc0617caf40a000f6507cb25cbc9d8b9900b49 (patch)
tree83f003d2eebf0662d26b32ee90f0f25eadf8997c /lispref/hash.texi
parent213010c544b5307de549eafe213308cdc5316258 (diff)
downloademacs-1fcc0617caf40a000f6507cb25cbc9d8b9900b49.tar.gz
(Creating Hash): Correct and clarify doc of WEAK values.
Diffstat (limited to 'lispref/hash.texi')
-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
anywhere else); if a particular value does get collected, the
corresponding association is removed from the hash table.
-If @var{weak} is @code{key-or-value} or @code{t}, the hash table does
-not protect either keys or values from garbage collection; if either
-one is collected as garbage, the association is removed.
+If @var{weak} is @code{key-and-value} or @code{t}, both the key and
+the value must be live in order to preserve the association. Thus,
+the hash table does not protect either keys or values from garbage
+collection; if either one is collected as garbage, that removes the
+association.
-If @var{weak} is @code{key-and-value}, associations are removed from
-the hash table when both their key and value would be collected as
-garbage, again not considering references to the key and value from
-weak hash tables.
+If @var{weak} is @code{key-or-value}, either the key or
+the value can preserve the association. Thus, associations are
+removed from the hash table when both their key and value would be
+collected as garbage (if not for references from weak hash tables).
The default for @var{weak} is @code{nil}, so that all keys and values
-referenced in the hash table are preserved from garbage collection. If
-@var{weak} is @code{t}, neither keys nor values are protected (that is,
-both are weak).
+referenced in the hash table are preserved from garbage collection.
@item :size @var{size}
This specifies a hint for how many associations you plan to store in the