1 | #ifndef MYCPP_HASH_H |
2 | #define MYCPP_HASH_H |
3 | |
4 | typedef unsigned (*HashFunc)(const char*, int); |
5 | |
6 | unsigned fnv1(const char* data, int len); |
7 | |
8 | template <typename L, typename R> |
9 | class Tuple2; |
10 | |
11 | class BigStr; |
12 | |
13 | unsigned hash_key(BigStr* s); |
14 | unsigned hash_key(int n); |
15 | unsigned hash_key(Tuple2<int, int>* t1); |
16 | unsigned hash_key(Tuple2<BigStr*, int>* t1); |
17 | unsigned hash_key(void* p); // e.g. for Dict<Token*, int> |
18 | |
19 | #endif // MYCPP_HASH_H |