@@ -47,6 +47,7 @@ static void sort_vector_copy (Lisp_Object, ptrdiff_t,
47
47
enum equal_kind { EQUAL_NO_QUIT , EQUAL_PLAIN , EQUAL_INCLUDING_PROPERTIES };
48
48
static bool internal_equal (Lisp_Object , Lisp_Object ,
49
49
enum equal_kind , int , Lisp_Object );
50
+ static EMACS_UINT sxhash_obj (Lisp_Object , int );
50
51
51
52
DEFUN ("identity" , Fidentity , Sidentity , 1 , 1 , 0 ,
52
53
doc : /* Return the ARGUMENT unchanged. */
@@ -4022,7 +4023,7 @@ hashfn_eq (Lisp_Object key, struct Lisp_Hash_Table *h)
4022
4023
Lisp_Object
4023
4024
hashfn_equal (Lisp_Object key , struct Lisp_Hash_Table * h )
4024
4025
{
4025
- return make_ufixnum (sxhash (key , 0 ));
4026
+ return make_ufixnum (sxhash (key ));
4026
4027
}
4027
4028
4028
4029
/* Ignore HT and return a hash code for KEY which uses 'eql' to compare keys.
@@ -4042,7 +4043,7 @@ hashfn_user_defined (Lisp_Object key, struct Lisp_Hash_Table *h)
4042
4043
{
4043
4044
Lisp_Object args [] = { h -> test .user_hash_function , key };
4044
4045
Lisp_Object hash = hash_table_user_defined_call (ARRAYELTS (args ), args , h );
4045
- return FIXNUMP (hash ) ? hash : make_ufixnum (sxhash (hash , 0 ));
4046
+ return FIXNUMP (hash ) ? hash : make_ufixnum (sxhash (hash ));
4046
4047
}
4047
4048
4048
4049
struct hash_table_test const
@@ -4606,13 +4607,13 @@ sxhash_list (Lisp_Object list, int depth)
4606
4607
CONSP (list ) && i < SXHASH_MAX_LEN ;
4607
4608
list = XCDR (list ), ++ i )
4608
4609
{
4609
- EMACS_UINT hash2 = sxhash (XCAR (list ), depth + 1 );
4610
+ EMACS_UINT hash2 = sxhash_obj (XCAR (list ), depth + 1 );
4610
4611
hash = sxhash_combine (hash , hash2 );
4611
4612
}
4612
4613
4613
4614
if (!NILP (list ))
4614
4615
{
4615
- EMACS_UINT hash2 = sxhash (list , depth + 1 );
4616
+ EMACS_UINT hash2 = sxhash_obj (list , depth + 1 );
4616
4617
hash = sxhash_combine (hash , hash2 );
4617
4618
}
4618
4619
@@ -4632,7 +4633,7 @@ sxhash_vector (Lisp_Object vec, int depth)
4632
4633
n = min (SXHASH_MAX_LEN , hash & PSEUDOVECTOR_FLAG ? PVSIZE (vec ) : hash );
4633
4634
for (i = 0 ; i < n ; ++ i )
4634
4635
{
4635
- EMACS_UINT hash2 = sxhash (AREF (vec , i ), depth + 1 );
4636
+ EMACS_UINT hash2 = sxhash_obj (AREF (vec , i ), depth + 1 );
4636
4637
hash = sxhash_combine (hash , hash2 );
4637
4638
}
4638
4639
@@ -4675,7 +4676,13 @@ sxhash_bignum (Lisp_Object bignum)
4675
4676
structure. Value is an unsigned integer clipped to INTMASK. */
4676
4677
4677
4678
EMACS_UINT
4678
- sxhash (Lisp_Object obj , int depth )
4679
+ sxhash (Lisp_Object obj )
4680
+ {
4681
+ return sxhash_obj (obj , 0 );
4682
+ }
4683
+
4684
+ static EMACS_UINT
4685
+ sxhash_obj (Lisp_Object obj , int depth )
4679
4686
{
4680
4687
EMACS_UINT hash ;
4681
4688
0 commit comments