aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2019-07-21 11:20:07 -0700
committerPaul Eggert2019-07-21 11:24:11 -0700
commitcf285946bee56912286f75e4d1215214bc7c5b4b (patch)
tree7d2e8c14783d757b1af8998b0654ce3622bbdc07 /src
parent4a1507b88e813e3d54614f4cb59211234e05334a (diff)
downloademacs-cf285946bee56912286f75e4d1215214bc7c5b4b.tar.gz
emacs-cf285946bee56912286f75e4d1215214bc7c5b4b.zip
Improve doc for hash tables
* doc/lispref/hash.texi (Creating Hash, Defining Hash): * src/fns.c (Fsxhash_eq, Fsxhash_eql, Fsxhash_equal): Say that hashes are fixnums. (Fmake_hash_table): Say that that an integer rehash-size should be a fixnum. * doc/lispref/hash.texi (Defining Hash): Say that hash and comparison functions should be consistent and pure, and should return quickly.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fns.c b/src/fns.c
index d7e123122d6..819eaec7c74 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -4700,7 +4700,7 @@ sxhash (Lisp_Object obj, int depth)
4700 ***********************************************************************/ 4700 ***********************************************************************/
4701 4701
4702DEFUN ("sxhash-eq", Fsxhash_eq, Ssxhash_eq, 1, 1, 0, 4702DEFUN ("sxhash-eq", Fsxhash_eq, Ssxhash_eq, 1, 1, 0,
4703 doc: /* Return an integer hash code for OBJ suitable for `eq'. 4703 doc: /* Return a fixnum hash code for OBJ suitable for `eq'.
4704If (eq A B), then (= (sxhash-eq A) (sxhash-eq B)). 4704If (eq A B), then (= (sxhash-eq A) (sxhash-eq B)).
4705 4705
4706Hash codes are not guaranteed to be preserved across Emacs sessions. */) 4706Hash codes are not guaranteed to be preserved across Emacs sessions. */)
@@ -4710,7 +4710,7 @@ Hash codes are not guaranteed to be preserved across Emacs sessions. */)
4710} 4710}
4711 4711
4712DEFUN ("sxhash-eql", Fsxhash_eql, Ssxhash_eql, 1, 1, 0, 4712DEFUN ("sxhash-eql", Fsxhash_eql, Ssxhash_eql, 1, 1, 0,
4713 doc: /* Return an integer hash code for OBJ suitable for `eql'. 4713 doc: /* Return a fixnum hash code for OBJ suitable for `eql'.
4714If (eql A B), then (= (sxhash-eql A) (sxhash-eql B)). 4714If (eql A B), then (= (sxhash-eql A) (sxhash-eql B)).
4715 4715
4716Hash codes are not guaranteed to be preserved across Emacs sessions. */) 4716Hash codes are not guaranteed to be preserved across Emacs sessions. */)
@@ -4720,7 +4720,7 @@ Hash codes are not guaranteed to be preserved across Emacs sessions. */)
4720} 4720}
4721 4721
4722DEFUN ("sxhash-equal", Fsxhash_equal, Ssxhash_equal, 1, 1, 0, 4722DEFUN ("sxhash-equal", Fsxhash_equal, Ssxhash_equal, 1, 1, 0,
4723 doc: /* Return an integer hash code for OBJ suitable for `equal'. 4723 doc: /* Return a fixnum hash code for OBJ suitable for `equal'.
4724If (equal A B), then (= (sxhash-equal A) (sxhash-equal B)). 4724If (equal A B), then (= (sxhash-equal A) (sxhash-equal B)).
4725 4725
4726Hash codes are not guaranteed to be preserved across Emacs sessions. */) 4726Hash codes are not guaranteed to be preserved across Emacs sessions. */)
@@ -4744,7 +4744,7 @@ keys. Default is `eql'. Predefined are the tests `eq', `eql', and
4744Default is 65. 4744Default is 65.
4745 4745
4746:rehash-size REHASH-SIZE - Indicates how to expand the table when it 4746:rehash-size REHASH-SIZE - Indicates how to expand the table when it
4747fills up. If REHASH-SIZE is an integer, increase the size by that 4747fills up. If REHASH-SIZE is a fixnum, increase the size by that
4748amount. If it is a float, it must be > 1.0, and the new size is the 4748amount. If it is a float, it must be > 1.0, and the new size is the
4749old size multiplied by that factor. Default is 1.5. 4749old size multiplied by that factor. Default is 1.5.
4750 4750