CK_HS_REMOVE(3)

πŸ’– CK_HS_REMOVE(3) πŸ’–

okay bestie, gather round, because we're talking about ck_hs_remove(3) β€” the manual page, the moment, the icon. this is the one that ✨removes a key from a hash set✨ and honestly? she ate.


πŸŽ€ LIBRARY πŸŽ€

Concurrency Kit (that's libck, and you link it with -lck, don't forget the flag or she simply will not show up πŸ’…)


✨ SYNOPSIS ✨

#include <ck_hs.h>

void *
ck_hs_remove(ck_hs_t *hs, unsigned long hash, const void *key);

🌸 DESCRIPTION 🌸

so here's the tea, bestie. ck_hs_remove(3) is gonna attempt to remove the key that you hand it in the key argument, out of the hash set that hs is pointing at. 🫢

and listen, the key you pass in? she's expected to have the hash value that you put in the hash argument. and where did that hash come from? from the CK_HS_HASH(3) macro, which you ran earlier, obviously. no cap. πŸ”₯

if the call to ck_hs_remove(3) went off without a hitch, then the key that was chillin' inside the hash set gets returned to you. but if that key was not a member of the hash set? you get NULL. that's it, that's the deal. πŸ’€


πŸ‘‘ RETURN VALUES πŸ‘‘

  • upon successful completion, ck_hs_remove(3) returns a pointer to a key πŸŽ‰
  • otherwise, it returns NULL on failure. sad girl hours, but that's the contract. 😭

πŸ¦‹ ERRORS πŸ¦‹

behavior is UNDEFINED if key or hs are uninitialized. like, genuinely undefined. not "kinda weird", not "a little off" β€” undefined. do not pass her uninitialized stuff, bestie, i am begging. πŸ™ˆ

🌈 SEE ALSO 🌈

the whole squad, fr fr:

additional information available at http://concurrencykit.org/ β€” go look, it's giving documentation excellence. πŸ’œ


k bye ily, this page was brought to you by the Concurrency Kit, dated September 17, 2012 β€” yeah she's been iconic since 2012, main character energy from day one, periodt. β­πŸ§šπŸ“

πŸ“¦ where this page comes from