qt_dictionary_put(3)

πŸ“¦ version 1.22^20251007gitcedb1fc, in fedora 43, fedora 44

πŸ’– qt_dictionary_put(3) β€” the libqthread girlies know πŸ’–

okay so bestie, we're in libqthread territory and this page is literally about putting stuff into a dictionary. iconic behavior, fr fr. no cap, this is the one you want. 🫢


✨ NAME ✨

qt_dictionary_put β€” insert a key/value pair into a dictionary

like. the name says it all. you put a thing in. slay. πŸ’…


🌸 SYNOPSIS 🌸

#include <qthread/dictionary.h>

void *
qt_dictionary_put (qt_dictionary *dict,
                   void *key,
                   void *value);

look at her. three args. clean. no notes. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea, bestie: this function inserts a key/value pair β€” that's the key and the value you handed it β€” into the dictionary called dict. πŸ’–

And here's the plot twist that actually matters: if the key already exists within the dictionary, the value associated with it is replaced by value. So it's not like, "oops, already taken, sorry babe" β€” no, it straight up swaps the old value out for the new one. that's main character energy honestly. πŸ”₯


πŸŽ€ RETURN VALUES πŸŽ€

  • Returns the address of the item in the dictionary after the put πŸ’–
  • Or NULL if the insert failed 😭 β€” yes bestie, you have to check for this one. do not skip the vibe check.

🌈 SEE ALSO 🌈

the whole girl squad, fr fr. go read these too, they're all in the family:

(that last one is literally her more cautious sister btw β€” she checks first. this one doesn't. iykyk. 🧚)


okay and just so you know β€” if NULL comes back, that's the insert being like "not today". always be checking. πŸ’€

later babes!! this was libqthread, qt_dictionary_put(3), dated AUGUST 2012 β€” yeah she's an elder but she still ate πŸ’…βœ¨ mwah, go put some keys in a dictionary bestie πŸ“πŸ«Ά

πŸ“¦ where this page comes from