Commit 29a7d73d authored by Stefan Monnier's avatar Stefan Monnier

* src/fns.c (hashfn_user_defined): Make sure we always return a fixnum.

parent 6bd817ee
Pipeline #2534 passed with stage
in 51 minutes and 36 seconds
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment