shishi_keys_add(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ shishi_keys_add(3) ✨

okay bestie, welcome to the shishi manual, page for shishi_keys_add πŸ’– this is the little API function that slides a key into a key set, and honestly? it's giving responsible memory management. let's get into it 🫢


🌸 NAME 🌸

shishi_keys_add β€” API function πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <shishi.h>

int shishi_keys_add(Shishi_keys * keys, Shishi_key * key);

like yes, two args, one int coming back, we love a clean signature ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi_keys * keys β€” the key set handle, as allocated by shishi_keys(). this is the lil collection you're adding into, k? πŸ’…
  • Shishi_key * key β€” the key that's getting added to that key set. the main character of this whole operation ngl 🌟

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this function adds a key to the key set. simple, iconic, does exactly what it says πŸŽ€

and here's the part that lowkey matters the most β€” it stores a deep copy of the key. which means if you go and change key afterwards, or deallocate it entirely, the value sitting inside the key set does not budge. not even a little. your key set keeps its own lil copy, safe and sound, no cap 🫢✨

so you can yeet the original key into the void and the set will still be chilling with its own version. obsessed with that actually πŸ˜­πŸ’–


⭐ RETURN VALUE ⭐

returns SHISHI_OK iff successful. that's it, that's the whole return value situation πŸ‘‘

fr fr, if it's not SHISHI_OK... something else happened, and that's on the caller to handle πŸ’€

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? spill it to <bug-shishi@gnu.org> bestie, they wanna know πŸ›πŸ’Œ


Copyright Β© 2002-2022 Simon Josefsson.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. periodt πŸ’…βœ¨


🌈 SEE ALSO 🌈

the full documentation for shishi is maintained as a Texinfo manual πŸ“š if the info and shishi programs are properly installed at your site, this command:

info shishi

should give you access to the complete manual. iykyk πŸ‘‘


and that's the page bestie!! πŸ’– this was shishi version 1.0.3, page shishi_keys_add(3), and yes i read the whole thing so you didn't have to 🫢 now go add some keys, slay, and remember: deep copy means deep copy, no take-backsies πŸŽ€πŸ¦‹πŸŒΈ