MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / HashTableNext

Function HashTableNext

src/util/dict.c:781–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781dictEntry *HashTableNext(dictIterator *iter)
782{
783 while (1) {
784 if (iter->entry == NULL) {
785 if (iter->index == -1 && iter->table == 0) {
786 if (iter->safe)
787 dictPauseRehashing(iter->d);
788 else
789 iter->fingerprint = HashTable_Fingerprint(iter->d);
790 }
791 iter->index++;
792 if (iter->index >= (long) DICTHT_SIZE(iter->d->ht_size_exp[iter->table])) {
793 if (dictIsRehashing(iter->d) && iter->table == 0) {
794 iter->table++;
795 iter->index = 0;
796 } else {
797 break;
798 }
799 }
800 iter->entry = iter->d->ht_table[iter->table][iter->index];
801 } else {
802 iter->entry = iter->nextEntry;
803 }
804 if (iter->entry) {
805 /* We need to save the 'next' here, the iterator user
806 * may delete the entry we are returning. */
807 iter->nextEntry = iter->entry->next;
808 return iter->entry;
809 }
810 }
811 return NULL;
812}
813
814void HashTableReleaseIterator(dictIterator *iter)
815{

Callers 3

ExecutionPlan_FreeFunction · 0.85
_handoffFunction · 0.85
CommitUpdatesFunction · 0.85

Calls 1

HashTable_FingerprintFunction · 0.85

Tested by

no test coverage detected