dictCreate(3)

πŸ’– dictCreate(3) πŸ’–

okay bestie, so this is a page from the util/dict.h cinematic universe and we're literally about to create a whole new dictionary. no cap. it's giving ✨data structures✨.


🌸 NAME 🌸

dictCreate β€” create new dictionary. that's it, that's the job, she's an icon, she's a legend and she IS the moment πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <util/dict.h>

NEOERR *dictCreate(dictCtx *dict, BOOL threaded, UINT32 root, UINT32 maxLevel,
    UINT32 flushLimit, BOOL useCase,
    dictFreeValueFunc freeValue, void *freeRock);

look at her. eight whole parameters. she's high maintenance but she's worth it πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • threaded β€” true if list should be thread-safe. basically "do you want her to be able to handle multiple people at once or nah" πŸ’€
  • root β€” performance parameter (see above). yes bestie, it says "see above", we don't make the rules πŸ™ˆ
  • maxLevel β€” performance parameter (see above). same energy fr fr
  • flushLimit β€” max deleted items to keep cached before forcing a flush. like, she'll hold onto the ghosts for a bit but eventually she's gotta let them go 😭
  • useCase β€” true to be case sensitive in identifiers. "BESTIE" and "bestie" are two different besties if this is on πŸ‘€
  • freeValue β€” callback when freeing a value. she calls you up when it's time to say goodbye 🫢
  • freeRock β€” context for freeValue callback. your little emotional support rock that gets passed along with it πŸͺ¨

🌈 DESCRIPTION 🌈

Returns a dictionary. periodt. πŸ’–

If <threaded> is true, list is multi-thread safe. so if you're living that chaotic multi-threaded main character life, flip that on and she can handle the group chat without any drama ✨

<root>, <maxLevel>, and <flushLimit> act as for skipNewList() (see skiplist.h). yes, the skiplist lore runs deep, iykyk 🧚

MT-Level: Safe. β€” say it with me: multi-thread SAFE. slay. πŸ”₯

⭐ RETURN VALUE ⭐

None.

and no bestie i do NOT mean "none as in she's useless", i mean the literal return value is None. the real treasure is the NEOERR * you get back in the synopsis. keep up πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page bestie, go forth and create your dictionaries, i believe in you fr fr πŸ“πŸ’œ

this one came from the ClearSilver girlies and she's dated 12 July 2007 β€” vintage, iconic, aged like fine wine πŸŽ€βœ¨