From 920128a260b0056f7b14b479232d96405d9a6e62 Mon Sep 17 00:00:00 2001 From: Bjorn Svensson Date: Mon, 25 Jan 2021 15:43:40 +0100 Subject: Stack allocate dict iterators Replacing the get & release functions with an initiation function. Simplifies the code and will make sure we run subscription callbacks in OOM scenarios. --- dict.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'dict.h') diff --git a/dict.h b/dict.h index 95fcd28..6ad0acd 100644 --- a/dict.h +++ b/dict.h @@ -119,8 +119,7 @@ static int dictReplace(dict *ht, void *key, void *val); static int dictDelete(dict *ht, const void *key); static void dictRelease(dict *ht); static dictEntry * dictFind(dict *ht, const void *key); -static dictIterator *dictGetIterator(dict *ht); +static void dictInitIterator(dictIterator *iter, dict *ht); static dictEntry *dictNext(dictIterator *iter); -static void dictReleaseIterator(dictIterator *iter); #endif /* __DICT_H */ -- cgit v1.2.3