Our hash table capability is a power of two */
| 1375 | |
| 1376 | /* Our hash table capability is a power of two */ |
| 1377 | static unsigned long _dictNextPower(unsigned long size) |
| 1378 | { |
| 1379 | unsigned long i = DICT_HT_INITIAL_SIZE; |
| 1380 | |
| 1381 | if (size >= LONG_MAX) return LONG_MAX + 1LU; |
| 1382 | while(1) { |
| 1383 | if (i >= size) |
| 1384 | return i; |
| 1385 | i *= 2; |
| 1386 | } |
| 1387 | } |
| 1388 | |
| 1389 | /* Returns the index of a free slot that can be populated with |
| 1390 | * a hash entry for the given 'key'. |
no outgoing calls
no test coverage detected