dictSetValue(3)

πŸ’– dictSetValue(3) πŸ’–

okay so bestie, this one lives in util/dict.h and it's literally the glow-up button for your dictionary entries. ✨


🌸 NAME 🌸

dictSetValue β€” set/reset an item's value. that's it, that's the whole job, and she does it flawlessly πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <util/dict.h>

NEOERR *dictSetValue(dictCtx dict, const char *id, void *value);

πŸŽ€ ARGUMENTS πŸŽ€

  • dict β€” the dictionary you're adding the pair to. your little home base 🏠
  • id β€” the identifier you wanna insert or update. the name tag, the vibe check, the who-is-who πŸͺͺ
  • value β€” the value you're storing. and bestie, listen: this may NOT be NULL. like, not even a little. don't do it. 🚫

✨ DESCRIPTION ✨

so what she does is: she updates the <id>/<value> pair into <dict>. and if <id> is not already in <dict>? no worries, she just creates it. icon behaviour, honestly. not me being obsessed with an insert-or-update function 😭

MT-Level: Safe if <dict> is thread-safe. like, she matches your energy. if your dict is thread-safe, she's thread-safe. periodt.


🌈 RETURN VALUE 🌈

None. she doesn't return anything. she's mysterious like that. she just does it. πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

iykyk, go read the whole friend group πŸ’–


ClearSilver, 12 July 2007 β€” yeah she's vintage, she's classic, she's been slaying since 2007 and she has not missed a day since 🫢✨