CK_HS_HASH(3)

πŸ’– CK_HS_HASH β€” the little macro that asks your hash set "hey bestie, what's the seed?" πŸ’–

okay so this is a page from the CK_HS_HASH(3) manual, section 3, and it lives in the Concurrency Kit library β€” that's libck, and you link it with -lck. iykyk 🫢


✨ NAME ✨

CK_HS_HASH β€” invoke hash function with hash set seed. that's it, that's the whole job, and she does it flawlessly πŸ’…


🌈 LIBRARY 🌈

Concurrency Kit β€” that's libck, and you link it like this:

-lck

πŸŽ€ SYNOPSIS πŸŽ€

#include <ck_hs.h>

unsigned long
CK_HS_HASH(ck_hs_t *hs, ck_hs_hash_cb_t *hf, const void *key);

like. look at her. three args, returns an unsigned long, no drama. main character energy fr fr πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

The CK_HS_HASH(3) macro will invoke the hash function pointed to by the hf argument with the seed value associated with hs and the key pointer specified by the key argument.

okay so like. translating from manpage-ese into bestie-ese: you hand her a hash set (hs), you hand her a hash function (hf), you hand her a key, and she calls that hash function with the seed that's already chillin' inside the hash set plus your key. she does NOT make up her own seed, she does NOT use a different function. she uses yours, with your set's seed. lowkey iconic that she just knows. πŸ’–


⭐ RETURN VALUES ⭐

This function will return the value returned by the hf function.

literally just passes the vibes straight through. whatever hf gives back, that's what you get back. no middleman nonsense, no "surprise, it's actually 0 now". 🧚


πŸ’€ ERRORS πŸ’€

It is expected hs was previously initialized via ck_hs_init(3).

bestie. i am begging you. initialize hs with ck_hs_init(3) first. if you don't, that's on you, not on her, and it is not going to be a cute moment. 🚨

🌸 SEE ALSO 🌸

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


and that's the whole page, periodt ✨ she's short, she's sweet, she knows her one (1) job and she ate. run to ck_hs_init(3) first and you two are gonna be so good together πŸ₯°

this page is from Concurrency Kit, dated March 28, 2012, and filed under CK_HS_HASH(3). mwah πŸ’‹

πŸ“¦ where this page comes from