From 604d515f015417051e1d3d9773e1c8914f0bbe19 Mon Sep 17 00:00:00 2001 From: Alexey Radul Date: Sun, 29 May 2011 22:47:49 +0100 Subject: [PATCH] Deprecate {strong/weak}-hash-table/constructor. Flush the detailed description of what they do as having been copied into the description of HASH-TABLE/CONSTRUCTOR. --- doc/ref-manual/associations.texi | 42 +++++++++----------------------- 1 file changed, 12 insertions(+), 30 deletions(-) diff --git a/doc/ref-manual/associations.texi b/doc/ref-manual/associations.texi index 22211927f..1a73f610b 100644 --- a/doc/ref-manual/associations.texi +++ b/doc/ref-manual/associations.texi @@ -618,36 +618,6 @@ been defined: @end group @end example -The next two procedures are used to create new hash-table constructors. -All of the above hash table constructors, with the exception of -@code{make-eqv-hash-table}, could have been created by calls to these -``constructor-constructors''; see the examples below. - -@deffn procedure strong-hash-table/constructor key-hash key=? [rehash-after-gc?] -@deffnx procedure weak-hash-table/constructor key-hash key=? [rehash-after-gc?] -@cindex hashing, of key in hash table -@cindex modulus, of hashing procedure -Each of these procedures accepts two arguments and returns a hash-table -constructor. The @var{key=?} argument is an equivalence predicate for -the keys of the hash table. The @var{key-hash} argument is a procedure -that computes a hash number. Specifically, @var{key-hash} accepts two -arguments, a key and an exact positive integer (the @dfn{modulus}), and -returns an exact non-negative integer that is less than the modulus. - -The optional argument @var{rehash-after-gc?}, if true, says that the -values returned by @var{key-hash} might change after a garbage -collection. If so, the hash-table implementation arranges for the table -to be rehashed when necessary. (@xref{Address Hashing}, for -information about hash procedures that have this property.) Otherwise, -it is assumed that @var{key-hash} always returns the same value for the -same arguments. The default value of this argument is @code{#f}. - -The constructors returned by @code{strong-hash-table/constructor} make -hash tables that hold their keys strongly. The constructors returned by -@code{weak-hash-table/constructor} make hash tables that hold their keys -weakly. -@end deffn - The following procedure is sometimes useful in conjunction with weak hash tables. Normally it is not needed, because such hash tables clean themselves automatically as they are used. @@ -676,6 +646,18 @@ These are aliases of @code{make-key-weak-eq-hash-table}. These are aliases of @code{make-key-weak-eqv-hash-table}. @end deffn +@deffn procedure strong-hash-table/constructor key-hash key=? [rehash-after-gc?] +Like @code{hash-table/constructor} but always uses +@code{hash-table-entry-type:strong}. If @var{rehash-after-gc?} is +omitted, it defaults to @code{#f}. +@end deffn + +@deffn procedure weak-hash-table/constructor key-hash key=? [rehash-after-gc?] +Like @code{hash-table/constructor} but always uses +@code{hash-table-entry-type:key-weak}. If @var{rehash-after-gc?} is +omitted, it defaults to @code{#f}. +@end deffn + @node Basic Hash Table Operations, Resizing of Hash Tables, Construction of Hash Tables, Hash Tables @subsection Basic Hash Table Operations -- 2.25.1