** Return the index of the hash bucket that the string specified by the ** arguments to this function belongs. */
| 8571 | ** arguments to this function belongs. |
| 8572 | */ |
| 8573 | static int idxHashString(const char *z, int n){ |
| 8574 | unsigned int ret = 0; |
| 8575 | int i; |
| 8576 | for(i=0; i<n; i++){ |
| 8577 | ret += (ret<<3) + (unsigned char)(z[i]); |
| 8578 | } |
| 8579 | return (int)(ret % IDX_HASH_SIZE); |
| 8580 | } |
| 8581 | |
| 8582 | /* |
| 8583 | ** If zKey is already present in the hash table, return non-zero and do |
no outgoing calls
no test coverage detected