diff options
author | sundb <sundbcn@gmail.com> | 2021-12-16 17:42:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-16 17:42:58 +0800 |
commit | c6657ef65bacc989a5ae1462062d41547fa84765 (patch) | |
tree | 859dfe063b7755339425c9ebbab3bdc55b4bf95f /dict.c | |
parent | fd033e983acb69f7814255e7836f255411e17007 (diff) | |
parent | da5a4ff3622e8744b772a76f6ce580dc9134fb38 (diff) |
Merge branch 'redis:master' into master
Diffstat (limited to 'dict.c')
-rw-r--r-- | dict.c | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -267,16 +267,11 @@ static dictEntry *dictFind(dict *ht, const void *key) { return NULL; } -static dictIterator *dictGetIterator(dict *ht) { - dictIterator *iter = hi_malloc(sizeof(*iter)); - if (iter == NULL) - return NULL; - +static void dictInitIterator(dictIterator *iter, dict *ht) { iter->ht = ht; iter->index = -1; iter->entry = NULL; iter->nextEntry = NULL; - return iter; } static dictEntry *dictNext(dictIterator *iter) { @@ -299,10 +294,6 @@ static dictEntry *dictNext(dictIterator *iter) { return NULL; } -static void dictReleaseIterator(dictIterator *iter) { - hi_free(iter); -} - /* ------------------------- private functions ------------------------------ */ /* Expand the hash table if needed */ |