CK_HT_ENTRY_KEY_DIRECT(3)

✨ NAME ✨

ck_ht_entry_key_direct β€” bestie, this hands you back the key value exactly as it's specified in a hash table entry πŸ’…


πŸ“š LIBRARY πŸ“š

Concurrency Kit (libck, link it with -lck) 🫢


🌸 SYNOPSIS 🌸

#include <ck_ht.h>

uintptr_t
ck_ht_entry_key_direct(ck_ht_entry_t *entry);

πŸ’– DESCRIPTION πŸ’–

Okay so ck_ht_entry_key_direct() returns the key value as specified in the object that entry points to. That's it. That's the whole job. Iconic behaviour, honestly. ✨

Heads up bestie: the entry is expected to be associated with a hash table that was initialized with CK_HT_MODE_DIRECT. Like, that's the vibe it was built for. Go peek at ck_ht_init(3) if you need the deets πŸ‘€

πŸŽ€ RETURN VALUES πŸŽ€

  • If the entry is empty, ck_ht_entry_key_direct() returns 0 πŸ«₯
  • Otherwise, it returns the key value stored in the object that entry points to πŸŽ‰

πŸ’€ ERRORS πŸ’€

Behavior is undefined if entry has not been initialized. Not "kinda weird", not "a little off" β€” undefined. So like… initialize your entries, bestie, I'm begging 😭

🌈 SEE ALSO 🌈

More info is waiting for you at http://concurrencykit.org/ πŸ¦‹


And that's the whole page, bestie β€” this one's from the Concurrency Kit manual, dated March 30, 2012, filed under CK_HT_ENTRY_KEY_DIRECT(3). Go initialize your entries. Mwah πŸ’‹

πŸ“¦ where this page comes from