dictModifyValue(3)
π dictModifyValue(3) π
okay bestie, so this one lives in util/dict.h and it's the glow-up function β it either makes a whole new value or tweaks the one that's already there. main character energy fr fr. β¨
πΈ NAME πΈ
dictModifyValue β create/modify an item.
π SYNOPSIS π
#include <util/dict.h>
NEOERR *dictModifyValue(dictCtx dict, const char *id, dictNewValueCB new_cb,
dictUpdateValueCB update, void *rock);
π¦ ARGUMENTS π¦
dictβ the dictionary we're adding the pair to, periodt.idβ the identifier of the value. like, its name tag π·οΈnewβ the function you call to create a brand new value (it's allowed to beNULL, no pressure).updateβ the function you call to modify a value. heads up: if this isNULL, the old value gets freed, and<new>is used instead. so yeah, choices were made πrockβ the context you pass along to<new>or<update>. carry it with you like a little emotional support rock πͺ¨π«Ά
π DESCRIPTION π
So here's the tea: it finds <id>'s value and calls <update> on it. Simple. But if <id> isn't in <dict> at all? Then it calls <new> to go get a fresh new value. iconic behaviour, honestly. π
MT-Level: Safe if <dict> is thread-safe.
β RETURN VALUE β
None. nothing. void. the silence is the answer π
π SEE ALSO π
dictDestroy(3), dictCleanup(3), dictReleaseLock(3), dictRemove(3), dictNext(3), dictCreate(3), dictSetValue(3), dictModifyValue(3), dictSearch
and that's the whole page, bestie!! this one's brought to you by ClearSilver, dated 12 July 2007 β yeah it's vintage, it's giving classic, we love her anyway πβ¨π
π¦ 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