Home | History | Annotate | Download | only in lib

Lines Matching full:hash

103 /* Basic character hash algorithm, taken from Python's string hash:
116 to the hash table size, which is a power of 2. We use double-hashing,
117 since we can calculate a second hash value cheaply by taking those bits
118 of the first hash value that were discarded (masked out) when the table
119 index was calculated: index = hash & mask, where mask = table->size - 1.
123 #define SECOND_HASH(hash, mask, power) \
124 ((((hash) & ~(mask)) >> ((power) - 1)) & ((mask) >> 2))
125 #define PROBE_STEP(hash, mask, power) \
126 ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
247 unsigned long hash;
2776 int j; /* hash table index */
2779 /* size of hash table must be at least 2 * (# of prefixed attributes) */
2782 /* hash table size must also be a power of 2 and >= 8 */
2791 version = 0; /* force re-initialization of nsAtts hash table */
2814 /* as we expand the name we also calculate its hash value */
2830 { /* Check hash table for duplicate of expanded name (uriName).
2835 j = uriHash & mask; /* index into hash table */
2837 /* for speed we compare stored hash values first */
2838 if (uriHash == nsAtts[j].hash) {
2866 /* fill empty slot with new version, uriName and hash value */
2868 nsAtts[j].hash = uriHash;
5846 hash(KEY s)
5872 i = hash(name) & ((unsigned long)table->size - 1);
5875 unsigned long h = hash(name);
5901 unsigned long newHash = hash(table->v[i]->name);