dictSearch(3)
π dictSearch(3) π
okay so bestie, welcome to dictSearch(3) β the little function from util/dict.h that goes hunting through a dictionary for your fave value and hands it back to you. it's giving "personal shopper but for data" β¨ let's get into it.
πΈ NAME πΈ
dictSearch β search for value in dictionary. no cap, that's the whole job description. π
β¨ SYNOPSIS β¨
#include <util/dict.h>
void *dictSearch(dictCtx dict, const char *id, void **plock);
likeβ¦ three args, one pointer back, and a whole lot of main character energy. π«Ά
π ARGUMENTS π
dictβ the dictionary you're searching in. your search zone. your kingdom. πidβ the identifier of the item you wanna find. it's literally the name tag at the party. π·οΈplockβ place for the value lock (orNULLif you're not about that lock life). π
π¦ DESCRIPTION π¦
so what it does: it searches for <id> in <dict>, and returns the value if it found it, or NULL if it didn't. that's it, that's the vibe. π
and here's the spicy part β if <plock> is non-NULL, then the lock returned in <plock> will be associated with the returned value. the way that works: until this lock is passed to dictReleaseLock(), the value will not be passed to the dictCleanupFunc callback (see dictCleanup()). so like, hold onto that lock and you're basically protecting your fave from getting swept up. π
MT-Level: Safe if <dict> is thread-safe. periodt. π§΅
β RETURN VALUE β
plockβ set to the value lock. yeah bestie, it writes back into your pointer. π
π SEE ALSO π
dictDestroy(3)dictCleanup(3)dictReleaseLock(3)dictRemove(3)dictNext(3)dictCreate(3)dictSetValue(3)dictModifyValue(3)dictSearch
like a whole friend group fr fr, go say hi. π«Άβ¨
ClearSilver Β· 12 July 2007 β yeah this page has been iconic since way back, and it's still serving. stay hydrated, lock your values, and go search something. π ππ¦
π¦ 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