CK_RHS_HASH(3)

✨ CK_RHS_HASH ✨

okay bestie, welcome to the CK_RHS_HASH(3) page, straight out of the Concurrency Kit (aka libck, link it with -lck) πŸ’– this one's a lil macro and she is so underrated, fr fr.


🌸 SYNOPSIS 🌸

#include <ck_rhs.h>

unsigned long
CK_RHS_HASH(ck_rhs_t *hs, ck_rhs_hash_cb_t *hf, const void *key);

like, that's the whole vibe. three args, one unsigned long back. slay.


πŸ¦‹ DESCRIPTION πŸ¦‹

so the CK_RHS_HASH(3) macro is basically a lil matchmaker πŸ’… she takes the hash function that hf points to, and she invokes it with:

  • the seed value that's chillin' inside hs 🌱
  • the key pointer you handed over as key πŸ”‘

that's it. that's the whole thing. no cap. she just calls your hash function for you, already seeded from the hash set, so you don't have to go digging for the seed yourself. iconic behavior tbh πŸ‘‘


⭐ RETURN VALUES ⭐

whatever your hf function returns is exactly what you get back. no middleman drama, she just passes the value straight through 🫢


πŸ’€ ERRORS πŸ’€

bestie. listen. it is expected that hs was previously initialized via ck_rhs_init(3). if you skipped that step, that's on you, not on her πŸ™ˆ don't be the person who forgot to init.

🌈 SEE ALSO 🌈

the whole friend group, go say hi:

and if you want even more lore, it's all waiting at http://concurrencykit.org/ ✨


k that's the page, mwah πŸ’‹ this was Concurrency Kit, dated March 28, 2012 β€” go forth and hash responsibly, bestie πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from