MCPcopy Create free account
hub / github.com/couchbase/forestdb / dictionary_hash

Function dictionary_hash

utils/iniparser.cc:246–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244/*--------------------------------------------------------------------------*/
245
246static unsigned dictionary_hash(char * key)
247{
248 int len ;
249 unsigned hash ;
250 int i ;
251
252 len = strlen(key);
253 for (hash=0, i=0 ; i<len ; i++) {
254 hash += (unsigned)key[i] ;
255 hash += (hash<<10);
256 hash ^= (hash>>6) ;
257 }
258 hash += (hash <<3);
259 hash ^= (hash >>11);
260 hash += (hash <<15);
261 return hash ;
262}
263
264
265/*-------------------------------------------------------------------------*/

Callers 3

dictionary_getFunction · 0.85
dictionary_setFunction · 0.85
dictionary_unsetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected