FNV-1a for interning (matches hash_table.c) */
| 19 | |
| 20 | /* FNV-1a for interning (matches hash_table.c) */ |
| 21 | static uint32_t intern_hash(const char *s, size_t len) { |
| 22 | uint32_t h = FNV_OFFSET_BASIS; |
| 23 | for (size_t i = 0; i < len; i++) { |
| 24 | h ^= (unsigned char)s[i]; |
| 25 | h *= FNV_PRIME; |
| 26 | } |
| 27 | return h; |
| 28 | } |
| 29 | |
| 30 | /* Bucket for open-addressing */ |
| 31 | typedef struct { |