MCPcopy Create free account
hub / github.com/F-Stack/f-stack / _dictInit

Function _dictInit

app/redis-6.2.6/src/dict.c:117–127  ·  view source on GitHub ↗

Initialize the hash table */

Source from the content-addressed store, hash-verified

115
116/* Initialize the hash table */
117int _dictInit(dict *d, dictType *type,
118 void *privDataPtr)
119{
120 _dictReset(&d->ht[0]);
121 _dictReset(&d->ht[1]);
122 d->type = type;
123 d->privdata = privDataPtr;
124 d->rehashidx = -1;
125 d->pauserehash = 0;
126 return DICT_OK;
127}
128
129/* Resize the table to the minimal size that contains all the elements,
130 * but with the invariant of a USED/BUCKETS ratio near to <= 1 */

Callers 1

dictCreateFunction · 0.70

Calls 1

_dictResetFunction · 0.70

Tested by

no test coverage detected