MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / idxHashString

Function idxHashString

modules/dasSQLITE/sqlite/shell.c:10416–10423  ·  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

10414** arguments to this function belongs.
10415*/
10416static int idxHashString(const char *z, int n){
10417 unsigned int ret = 0;
10418 int i;
10419 for(i=0; i<n; i++){
10420 ret += (ret<<3) + (unsigned char)(z[i]);
10421 }
10422 return (int)(ret % IDX_HASH_SIZE);
10423}
10424
10425/*
10426** 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