Lines Matching refs:key

65 static int _dictKeyIndex(dict *ht, const void *key);
71 unsigned int dictIntHashFunction(unsigned int key) in dictIntHashFunction() argument
73 key += ~(key << 15); in dictIntHashFunction()
74 key ^= (key >> 10); in dictIntHashFunction()
75 key += (key << 3); in dictIntHashFunction()
76 key ^= (key >> 6); in dictIntHashFunction()
77 key += ~(key << 11); in dictIntHashFunction()
78 key ^= (key >> 16); in dictIntHashFunction()
79 return key; in dictIntHashFunction()
103 unsigned int dictGenHashFunction(const void *key, int len) { in dictGenHashFunction() argument
114 const unsigned char *data = (const unsigned char *)key; in dictGenHashFunction()
266 h = dictHashKey(d, de->key) & d->ht[1].sizemask; in dictRehash()
322 int dictAdd(dict *d, void *key, void *val) in dictAdd() argument
324 dictEntry *entry = dictAddRaw(d,key); in dictAdd()
346 dictEntry *dictAddRaw(dict *d, void *key) in dictAddRaw() argument
356 if ((index = _dictKeyIndex(d, key)) == -1) in dictAddRaw()
370 dictSetKey(d, entry, key); in dictAddRaw()
378 int dictReplace(dict *d, void *key, void *val) in dictReplace() argument
384 if (dictAdd(d, key, val) == DICT_OK) in dictReplace()
387 entry = dictFind(d, key); in dictReplace()
405 dictEntry *dictReplaceRaw(dict *d, void *key) { in dictReplaceRaw() argument
406 dictEntry *entry = dictFind(d,key); in dictReplaceRaw()
408 return entry ? entry : dictAddRaw(d,key); in dictReplaceRaw()
412 static int dictGenericDelete(dict *d, const void *key, int nofree) in dictGenericDelete() argument
420 h = dictHashKey(d, key); in dictGenericDelete()
427 if (key==he->key || dictCompareKeys(d, key, he->key)) { in dictGenericDelete()
449 int dictDelete(dict *ht, const void *key) { in dictDelete() argument
450 return dictGenericDelete(ht,key,0); in dictDelete()
453 int dictDeleteNoFree(dict *ht, const void *key) { in dictDeleteNoFree() argument
454 return dictGenericDelete(ht,key,1); in dictDeleteNoFree()
492 dictEntry *dictFind(dict *d, const void *key) in dictFind() argument
499 h = dictHashKey(d, key); in dictFind()
504 if (key==he->key || dictCompareKeys(d, key, he->key)) in dictFind()
513 void *dictFetchValue(dict *d, const void *key) { in dictFetchValue() argument
516 he = dictFind(d,key); in dictFetchValue()
966 static int _dictKeyIndex(dict *d, const void *key) in _dictKeyIndex() argument
975 h = dictHashKey(d, key); in _dictKeyIndex()
981 if (key==he->key || dictCompareKeys(d, key, he->key)) in _dictKeyIndex()