| 47 | |
| 48 | |
| 49 | unsigned int luaS_hash (const char *str, size_t l, unsigned int seed) { |
| 50 | unsigned int h = seed ^ cast(unsigned int, l); |
| 51 | size_t step = (l >> LUAI_HASHLIMIT) + 1; |
| 52 | for (; l >= step; l -= step) |
| 53 | h ^= ((h<<5) + (h>>2) + cast_byte(str[l - 1])); |
| 54 | return h; |
| 55 | } |
| 56 | |
| 57 | |
| 58 | unsigned int luaS_hashlongstr (TString *ts) { |
no test coverage detected