comparison src/elhash.c @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents 3a7e78e1142d
children 84b14dcb0985
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
68 68
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) \
82 for (; \ 82 for (; \
83 !HENTRY_CLEAR_P (probe) || \ 83 !HENTRY_CLEAR_P (probe) || \
84 (probe == entries + size ? \ 84 (probe == entries + size ? \