From: Stefan Monnier Date: Tue, 23 Jul 2019 12:29:21 +0000 (-0400) Subject: * src/fns.c (hashfn_user_defined): Make sure we always return a fixnum. X-Git-Tag: emacs-27.0.90~1817^2~157 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29a7d73d195761e8309a4fe23872888758436d1e;p=emacs.git * src/fns.c (hashfn_user_defined): Make sure we always return a fixnum. --- diff --git a/src/fns.c b/src/fns.c index d28d437df9c..f4f3b95ac64 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4023,7 +4023,7 @@ hashfn_user_defined (Lisp_Object key, struct Lisp_Hash_Table *h) { Lisp_Object args[] = { h->test.user_hash_function, key }; Lisp_Object hash = hash_table_user_defined_call (ARRAYELTS (args), args, h); - return BIGNUMP (hash) ? make_fixnum (sxhash_bignum (XBIGNUM (hash))) : hash; + return FIXNUMP (hash) ? hash : make_fixnum (sxhash (hash, 0)); } struct hash_table_test const