MCPcopy Create free account
hub / github.com/audacity/audacity / idxHashString

Function idxHashString

lib-src/sqlite/shell.c:8573–8580  ·  view source on GitHub ↗

** Return the index of the hash bucket that the string specified by the ** arguments to this function belongs. */

Source from the content-addressed store, hash-verified

8571** arguments to this function belongs.
8572*/
8573static 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

Callers 2

idxHashAddFunction · 0.85
idxHashFindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected