CK_HT_ENTRY_KEY_LENGTH(3)

πŸ’– CK_HT_ENTRY_KEY_LENGTH πŸ’–

okay bestie, so this is a page from the Concurrency Kit manual β€” ck_ht_entry_key_length(3), aka the little function that tells you how long your key is. it's in libck, link it with -lck. let's get into it πŸ’…


✨ NAME ✨

ck_ht_entry_key_length β€” returns the length of the key specified in the argument

like. it's giving "how many bytes is this key, ma'am". that's the whole job. πŸŽ€


πŸ“š LIBRARY πŸ“š

Concurrency Kit (libck, -lck)


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ck_ht.h>

uint16_t
ck_ht_entry_key_length(ck_ht_entry_t *entry);

🌸 DESCRIPTION 🌸

so ck_ht_entry_key_length() returns the length of the key that's associated with the object pointed to by the entry argument. that's it. that's the function. no cap. ✨

and here's the vibe check: it expects that entry is associated with a hash table that was initialized with CK_HT_MODE_BYTESTRING. so if your table isn't in bytestring mode… bestie. check ck_ht_init(3) for the deets before you come for this function. 🫢


πŸŽ€ RETURN VALUES πŸŽ€

ck_ht_entry_key_length() returns 0 if the entry is empty. periodt.


πŸ’€ ERRORS πŸ’€

Behavior is undefined if entry has not been initialized.

not "it might be weird", not "it'll probably be fine" β€” undefined. literally the void. initialize your entries, i am begging you 😭


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:

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


and that's the whole page, bestie 🧚 from the Concurrency Kit girlies, dated March 30, 2012 β€” mwah, go initialize your entries πŸ’–πŸŽ€βœ¨

πŸ“¦ where this page comes from