Mercurial > hg > xemacs-beta
comparison src/elhash.c @ 444:576fb035e263 r21-2-37
Import from CVS: tag r21-2-37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:36:19 +0200 |
parents | abe6d1db359e |
children | 98528da0b7fc |
comparison
equal
deleted
inserted
replaced
443:a8296e22da4e | 444:576fb035e263 |
---|---|
69 #define HASH_TABLE_DEFAULT_SIZE 16 | 69 #define HASH_TABLE_DEFAULT_SIZE 16 |
70 #define HASH_TABLE_DEFAULT_REHASH_SIZE 1.3 | 70 #define HASH_TABLE_DEFAULT_REHASH_SIZE 1.3 |
71 #define HASH_TABLE_MIN_SIZE 10 | 71 #define HASH_TABLE_MIN_SIZE 10 |
72 | 72 |
73 #define HASH_CODE(key, ht) \ | 73 #define HASH_CODE(key, ht) \ |
74 ((((ht)->hash_function ? (ht)->hash_function (key) : LISP_HASH (key)) \ | 74 ((((ht)->hash_function ? (ht)->hash_function (key) : LISP_HASH (key)) \ |
75 * (ht)->golden_ratio) \ | 75 * (ht)->golden_ratio) \ |
76 % (ht)->size) | 76 % (ht)->size) |
77 | 77 |
78 #define KEYS_EQUAL_P(key1, key2, testfun) \ | 78 #define KEYS_EQUAL_P(key1, key2, testfun) \ |
79 (EQ (key1, key2) || ((testfun) && (testfun) (key1, key2))) | 79 (EQ (key1, key2) || ((testfun) && (testfun) (key1, key2))) |
80 | 80 |
81 #define LINEAR_PROBING_LOOP(probe, entries, size) \ | 81 #define LINEAR_PROBING_LOOP(probe, entries, size) \ |
1430 return LISP_HASH (obj); | 1430 return LISP_HASH (obj); |
1431 } | 1431 } |
1432 | 1432 |
1433 DEFUN ("sxhash", Fsxhash, 1, 1, 0, /* | 1433 DEFUN ("sxhash", Fsxhash, 1, 1, 0, /* |
1434 Return a hash value for OBJECT. | 1434 Return a hash value for OBJECT. |
1435 (equal obj1 obj2) implies (= (sxhash obj1) (sxhash obj2)). | 1435 \(equal obj1 obj2) implies (= (sxhash obj1) (sxhash obj2)). |
1436 */ | 1436 */ |
1437 (object)) | 1437 (object)) |
1438 { | 1438 { |
1439 return make_int (internal_hash (object, 0)); | 1439 return make_int (internal_hash (object, 0)); |
1440 } | 1440 } |