CK_HT_HASH(3)

πŸ’– CK_HT_HASH(3) β€” ck_ht_hash πŸ’–

okay so bestie, welcome to the ck_ht_hash page of the Concurrency Kit manual (that's section 3 of the man pages, iykyk) πŸ¦‹


πŸ“š LIBRARY

Concurrency Kit β€” link it with libck, aka -lck. That's the whole vibe. ✨


πŸŽ€ SYNOPSIS

#include <ck_ht.h>

void
ck_ht_hash(ck_ht_hash_t *h, ck_ht_t *ht, const void *key,
    uint16_t key_length);

✨ DESCRIPTION ✨

so basically, ck_ht_hash() is the girl who does the math so you don't have to πŸ’…

She generates a hash value, and she tucks it right into the object that h points to. That value? It's valid for use in the hash table that ht points to, for the key you hand her β€” and that key is a bytestring type thing, specified by the key argument. 🌸

How long is that key, you ask? That's literally what key_length is for. She needs to know how many bytes she's working with, no cap. 🫢


🫧 RETURN VALUES

ck_ht_hash() has no return value. She gives you nothing back β€” she just does the thing and fills in h. Silent queen behavior, honestly. πŸ‘‘


πŸ’€ ERRORS

Behavior is undefined if key is NULL or if ht is uninitialized. 😭

fr fr, do NOT do this. Undefined behavior is not the moment. Vibe check your pointers first, bestie. 🚨


πŸ‘€ SEE ALSO

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


and that's the whole page, bestie πŸ’œ this one's from March 29, 2012, and it lives in the Concurrency Kit family (libck, -lck) β€” go read the rest of the girlies in SEE ALSO, they ate. periodt. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from