qt_dictionary_put(3)
π 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
NULLif 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:
qt_dictionary_create(3)qt_dictionary_delete(3)qt_dictionary_destroy(3)qt_dictionary_end(3)qt_dictionary_get(3)qt_dictionary_iterator_copy(3)qt_dictionary_iterator_create(3)qt_dictionary_iterator_destroy(3)qt_dictionary_iterator_equals(3)qt_dictionary_iterator_get(3)qt_dictionary_iterator_next(3)qt_dictionary_put_if_absent(3)
(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
- fedora 43: qthreads-devel 1.22^20251007gitcedb1fc-1.fc43 Β· BSD-3-Clause AND MIT AND dtoa
- fedora 44: qthreads-devel 1.22^20251007gitcedb1fc-2.fc44 Β· BSD-3-Clause AND MIT AND dtoa
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms