comparison src/fns.c @ 25495:5051c1d824fa

(Fhash_table_weakness): Replaces F_hash_table_weak. (cmpfn_eql, sxhash): Use XFLOAT_DATA.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 02 Sep 1999 20:52:51 +0000
parents 8c2f3438bb2c
children 9392c9b7dd07
comparison
equal deleted inserted replaced
25494:170d491fe703 25495:5051c1d824fa
3428 Lisp_Object key1, key2; 3428 Lisp_Object key1, key2;
3429 unsigned hash1, hash2; 3429 unsigned hash1, hash2;
3430 { 3430 {
3431 return (FLOATP (key1) 3431 return (FLOATP (key1)
3432 && FLOATP (key2) 3432 && FLOATP (key2)
3433 && XFLOAT (key1)->data == XFLOAT (key2)->data); 3433 && XFLOAT_DATA (key1) == XFLOAT_DATA (key2));
3434 } 3434 }
3435 3435
3436 3436
3437 /* Compare KEY1 which has hash code HASH1 and KEY2 with hash code 3437 /* Compare KEY1 which has hash code HASH1 and KEY2 with hash code
3438 HASH2 in hash table H using `equal'. Value is non-zero if KEY1 and 3438 HASH2 in hash table H using `equal'. Value is non-zero if KEY1 and
4149 hash = sxhash_list (obj, depth); 4149 hash = sxhash_list (obj, depth);
4150 break; 4150 break;
4151 4151
4152 case Lisp_Float: 4152 case Lisp_Float:
4153 { 4153 {
4154 unsigned char *p = (unsigned char *) &XFLOAT (obj)->data; 4154 unsigned char *p = (unsigned char *) &XFLOAT_DATA (obj);
4155 unsigned char *e = p + sizeof XFLOAT (obj)->data; 4155 unsigned char *e = p + sizeof XFLOAT_DATA (obj);
4156 for (hash = 0; p < e; ++p) 4156 for (hash = 0; p < e; ++p)
4157 hash = SXHASH_COMBINE (hash, *p); 4157 hash = SXHASH_COMBINE (hash, *p);
4158 break; 4158 break;
4159 } 4159 }
4160 4160
4414 { 4414 {
4415 return check_hash_table (table)->test; 4415 return check_hash_table (table)->test;
4416 } 4416 }
4417 4417
4418 4418
4419 DEFUN ("hash-table-weak", Fhash_table_weak, Shash_table_weak, 1, 1, 0, 4419 DEFUN ("hash-table-weakness", Fhash_table_weakness, Shash_table_weakness,
4420 1, 1, 0,
4420 "Return the weakness of TABLE.") 4421 "Return the weakness of TABLE.")
4421 (table) 4422 (table)
4422 Lisp_Object table; 4423 Lisp_Object table;
4423 { 4424 {
4424 return check_hash_table (table)->weak; 4425 return check_hash_table (table)->weak;
4567 defsubr (&Shash_table_count); 4568 defsubr (&Shash_table_count);
4568 defsubr (&Shash_table_rehash_size); 4569 defsubr (&Shash_table_rehash_size);
4569 defsubr (&Shash_table_rehash_threshold); 4570 defsubr (&Shash_table_rehash_threshold);
4570 defsubr (&Shash_table_size); 4571 defsubr (&Shash_table_size);
4571 defsubr (&Shash_table_test); 4572 defsubr (&Shash_table_test);
4572 defsubr (&Shash_table_weak); 4573 defsubr (&Shash_table_weakness);
4573 defsubr (&Shash_table_p); 4574 defsubr (&Shash_table_p);
4574 defsubr (&Sclrhash); 4575 defsubr (&Sclrhash);
4575 defsubr (&Sgethash); 4576 defsubr (&Sgethash);
4576 defsubr (&Sputhash); 4577 defsubr (&Sputhash);
4577 defsubr (&Sremhash); 4578 defsubr (&Sremhash);