Initialize the hash table */
| 115 | |
| 116 | /* Initialize the hash table */ |
| 117 | int _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 */ |
no test coverage detected