array_fail(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

🌸 NAME 🌸

okay so bestie, this page is array_fail(3) from the Library Functions Manual, and it does exactly one thing: it switches your array to have failed πŸ’…


✨ SYNTAX ✨

first, the vibe check β€” pull in the header:

#include <libowfat/array.h>

the actual call:

void array_fail(array* x);

and here's how you'd fr use it on a real array:

array x;
array_fail(&x);

πŸ’– DESCRIPTION πŸ’–

okay so it all depends on what state your x is in, and there are literally three moods πŸ‘‘

  • if x is allocated β€” array_fail frees the region that x points to, and then switches x to have failed. bye bye memory, hello failure 🫢
  • if x is unallocated β€” no freeing needed, it just switches x to have failed. simple. clean. iconic.
  • if x has already failed β€” array_fail has no effect. she's already there, nothing left to do, no notes πŸ’€
ngl the third one is giving "we been knew" energy β€” failing twice isn't a thing, it's just a no-op ✨

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, they're the rest of the friend group:


and that's the whole page, bestie πŸŽ€ that's it, that's the function β€” short, sweet, and honestly kind of a slay. this was array_fail(3) from the Library Functions Manual, and no date on the original footer so she's lowkey timeless πŸ’œ bye mwah πŸ¦‹