dictNext(3)
π dictNext(3) π
okay bestie, we're in util/dict.h territory and this one is literally the little iterator that could β¨
πΈ NAME πΈ
dictNext β search for next value in dictionary. that's it, that's the whole gig π
π SYNOPSIS π
#include <util/dict.h>
void *dictNext(dictCtx dict, char **id, void **plock);
π¦ ARGUMENTS π¦
dictβ the dictionary you're iterating over. your main character, fr.idβ pointer to the identifier of the last item you found, OR a pointer toNULLif you wanna grab the first one. lowkey the "where was I" bookmark πplockβ a place for the value lock (orNULLif you don't want one, no pressure bestie).
β¨ DESCRIPTION β¨
so you can use this to iterate through values in the dictionary. the way that it does that π«
the order? it's the order of the hash of the ids. and ngl, that is not usefully externally. it's giving "chaos but make it deterministic" π
it'll return the value if found, or NULL if not. simple as.
if <plock> is non-NULL, then the lock returned in <plock> gets associated with the returned value. and until you pass that lock to dictReleaseLock(), the value will not be passed to the dictCleanupFunc callback (see dictCleanup()). so like, hold onto that lock or the cleanup crew comes for your value, no cap π
MT-Level: Safe if <dict> is thread-safe. periodt.
π RETURN VALUE π
plockβ set to value lock.idβ pointer to id of found value. found her! π
π SEE ALSO π
dictDestroy(3), dictCleanup(3), dictReleaseLock(3), dictRemove(3), dictNext(3), dictCreate(3), dictSetValue(3), dictModifyValue(3), dictSearch
(yes bestie, dictNext(3) is in its own SEE ALSO list. iconic behavior honestly π«Ά)
and that's the whole page, mwah π this came from ClearSilver, dated 12 July 2007 β yeah she's vintage but she ate and left no crumbs πβ¨
π¦ where this page comes from
- debian bookworm: clearsilver-dev 0.10.5-4+b5
- debian trixie: clearsilver-dev 0.10.5-6+b1
- epel 10: clearsilver 0.10.5-80.el10_2 Β· Apache-1.1
- epel 9: clearsilver 0.10.5-74.el9 Β· Apache-1.1
- fedora 43: clearsilver 0.10.5-80.fc43 Β· Apache-1.1
- fedora 44: clearsilver 0.10.5-82.fc44 Β· Apache-1.1
- ubuntu jammy: clearsilver-dev 0.10.5-4build3
- ubuntu noble: clearsilver-dev 0.10.5-4build7
- ubuntu questing: clearsilver-dev 0.10.5-6build1
- ubuntu resolute: clearsilver-dev 0.10.5-7
- ubuntu stonking: clearsilver-dev 0.10.5-7build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms