| 157 | } |
| 158 | |
| 159 | static void *htable_val(const struct htable *ht, |
| 160 | struct htable_iter *i, size_t hash, uintptr_t perfect) |
| 161 | { |
| 162 | uintptr_t h2 = get_hash_ptr_bits(ht, hash) | perfect; |
| 163 | |
| 164 | while (ht->table[i->off]) { |
| 165 | if (ht->table[i->off] != HTABLE_DELETED) { |
| 166 | if (get_extra_ptr_bits(ht, ht->table[i->off]) == h2) |
| 167 | return get_raw_ptr(ht, ht->table[i->off]); |
| 168 | } |
| 169 | i->off = (i->off + 1) & ((1 << ht->bits)-1); |
| 170 | h2 &= ~perfect; |
| 171 | } |
| 172 | return NULL; |
| 173 | } |
| 174 | |
| 175 | void *htable_firstval_(const struct htable *ht, |
| 176 | struct htable_iter *i, size_t hash) |
no test coverage detected