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