CK_HT_ENTRY_VALUE(3)

πŸ’– CK_HT_ENTRY_VALUE β€” bestie, it's giving "grab the value" πŸ’–

okay so this is a page from the Concurrency Kit manual, aka libck β€” link it with -lck and you're in business ✨


✨ NAME ✨

ck_ht_entry_value β€” return pointer to value as specified in hash table entry πŸŽ€


🌸 LIBRARY 🌸

Concurrency Kit (libck, -lck) 🫢


πŸ’… SYNOPSIS πŸ’…

#include <ck_ht.h>

void *
ck_ht_entry_value(ck_ht_entry_t *entry);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the way that ck_ht_entry_value() works is it hands you back the value pointer that's specified in the object that entry points to. that's it. that's the whole function. short and iconic, no cap πŸ’…

heads up bestie β€” it's expected that entry is associated with a hash table that was initialized with CK_HT_MODE_BYTESTRING. peek at ck_ht_init(3) for the deets, iykyk ✨

πŸŽ€ RETURN VALUES πŸŽ€

ck_ht_entry_value() returns the value pointed to by entry. literally just that pointer. slay πŸ’–


πŸ’€ ERRORS πŸ’€

okay so this is the part where you need to be careful, fr fr:

Behavior is undefined if entry has not been initialized or if the key is empty. not me finding out the hard way 😭 initialize your entries, bestie, please πŸ™ˆ

🌈 SEE ALSO 🌈

the whole friend group, all linked up πŸ’œ

Additional information available at http://concurrencykit.org/ 🧚


and that's the whole page, bestie!! this one dropped on March 30, 2012 and it lives in section 3 as CK_HT_ENTRY_VALUE(3) β€” mwah πŸ’‹ go read your entries responsibly πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from