Lines Matching refs:hashCode
81 int hashCode = tab->nodeHash(node);
82 hashCode = (hashCode < 0) ? -hashCode : hashCode;
83 hashCode = hashCode % tab->maxBucket;
84 INIT_ERROR_CHECK(hashCode < tab->maxBucket, return -1, "Invalid hashcode %d %d", tab->maxBucket, hashCode);
87 HashNode *tmp = GetHashNodeByNode(tab, tab->buckets[hashCode], node);
92 node->next = tab->buckets[hashCode];
93 tab->buckets[hashCode] = node;
101 int hashCode = tab->keyHash(key);
102 hashCode = (hashCode < 0) ? -hashCode : hashCode;
103 hashCode = hashCode % tab->maxBucket;
104 INIT_ERROR_CHECK(hashCode < tab->maxBucket, return, "Invalid hashcode %d %d", tab->maxBucket, hashCode);
106 HashNode *node = tab->buckets[hashCode];
111 if (node == tab->buckets[hashCode]) {
112 tab->buckets[hashCode] = node->next;
127 int hashCode = tab->keyHash(key);
128 hashCode = (hashCode < 0) ? -hashCode : hashCode;
129 hashCode = hashCode % tab->maxBucket;
130 INIT_ERROR_CHECK(hashCode < tab->maxBucket, return NULL,
131 "Invalid hashcode %d %d", tab->maxBucket, hashCode);
132 return GetHashNodeByKey(tab, tab->buckets[hashCode], key, tab->keyCompare);
161 int hashCode, const void *key, HashKeyCompare keyCompare)
166 INIT_ERROR_CHECK((hashCode < tab->maxBucket) && (hashCode >= 0), return NULL,
167 "Invalid hash code %d %d", tab->maxBucket, hashCode);
168 return GetHashNodeByKey(tab, tab->buckets[hashCode], key, keyCompare);