summaryrefslogtreecommitdiff
path: root/dict.c
diff options
context:
space:
mode:
Diffstat (limited to 'dict.c')
-rw-r--r--dict.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/dict.c b/dict.c
index 34a33ea..ad57181 100644
--- a/dict.c
+++ b/dict.c
@@ -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 */