diff options
| author | Gerd Moellmann | 2000-07-30 11:50:38 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-07-30 11:50:38 +0000 |
| commit | 18925e78bbcbe06a6133286203d320ea338d1d18 (patch) | |
| tree | 85fe28002f0942e5b028ad43cb48db77f4e6a0f8 /lispref | |
| parent | 15cca6c4f6b8751d22c0467a015bfb1880fe9fd8 (diff) | |
| download | emacs-18925e78bbcbe06a6133286203d320ea338d1d18.tar.gz emacs-18925e78bbcbe06a6133286203d320ea338d1d18.zip | |
*** empty log message ***
Diffstat (limited to 'lispref')
| -rw-r--r-- | lispref/hash.texi | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/lispref/hash.texi b/lispref/hash.texi index e20b67b430a..3f4e4380be6 100644 --- a/lispref/hash.texi +++ b/lispref/hash.texi | |||
| @@ -95,16 +95,26 @@ The weakness of a hash table specifies whether the presence of a key or | |||
| 95 | value in the hash table preserves it from garbage collection. | 95 | value in the hash table preserves it from garbage collection. |
| 96 | 96 | ||
| 97 | The value, @var{weak}, must be one of @code{nil}, @code{key}, | 97 | The value, @var{weak}, must be one of @code{nil}, @code{key}, |
| 98 | @code{value} or @code{t}. If @var{weak} is @code{key} or @code{t}, then | 98 | @code{value}, @code{key-or-value}, @code{key-and-value}, or @code{t} |
| 99 | the hash table does not prevent its keys from being collected as garbage | 99 | which is an alias for @code{key-and-value}. If @var{weak} is @code{key} |
| 100 | (if they are not referenced anywhere else); if a particular key does get | 100 | then the hash table does not prevent its keys from being collected as |
| 101 | collected, the corresponding association is removed from the hash table. | 101 | garbage (if they are not referenced anywhere else); if a particular key |
| 102 | 102 | does get collected, the corresponding association is removed from the | |
| 103 | Likewise, if @var{weak} is @code{value} or @code{t}, then the hash table | 103 | hash table. |
| 104 | does not prevent values from being collected as garbage (if they are not | 104 | |
| 105 | referenced anywhere else); if a particular value does get collected, the | 105 | If @var{weak} is @code{value}, then the hash table does not prevent |
| 106 | values from being collected as garbage (if they are not referenced | ||
| 107 | anywhere else); if a particular value does get collected, the | ||
| 106 | corresponding association is removed from the hash table. | 108 | corresponding association is removed from the hash table. |
| 107 | 109 | ||
| 110 | If @var{weak} is @code{key-or-value}, associations are removed from the | ||
| 111 | hash table when either their key or their value part would be collected | ||
| 112 | as garbage, not counting references to the key and value from weak hash | ||
| 113 | tables. Likewise, if @var{weak} is @code{key-and-value}, associations | ||
| 114 | are removed from the hash table when both their key and value would be | ||
| 115 | collected as garbage, again not considering references to the key and | ||
| 116 | value from weak hash tables. | ||
| 117 | |||
| 108 | The default for @var{weak} is @code{nil}, so that all keys and values | 118 | The default for @var{weak} is @code{nil}, so that all keys and values |
| 109 | referenced in the hash table are preserved from garbage collection. If | 119 | referenced in the hash table are preserved from garbage collection. If |
| 110 | @var{weak} is @code{t}, neither keys nor values are protected (that is, | 120 | @var{weak} is @code{t}, neither keys nor values are protected (that is, |