iarray_get(3)
β¨ iarray_get(3) β¨
okay bestie, welcome to the Library Functions Manual π this one's short and sweet, no cap.
πΈ NAME πΈ
iarray_get β get pointer to nth element in iarray π―
π SYNTAX π
#include <libowfat/iarray.h>
void* iarray_get(iarray* x, size_t pos);
and like, in real life you'd actually call it like this:
iarray x;
size_t pos;
t* p = iarray_get(&x,pos);
π¦ DESCRIPTION π¦
so iarray_get is basically iarray_allocate's chill cousin π
same energy, but with one big difference: it only works if the element has previously been allocated. it's not out here creating anything for you, okay?
and if the element in the iarray isn't there? it doesn't get weird about it β it just fails instead of messing with the iarray. no surprise side quests, no changing your data behind your back π
which also means it guarantees there will be no locks π so this function returns in deterministic time. consistent queen behavior, we love to see it π
β RETURN VALUE β
- returns a pointer to the requested element π«Ά
- if there's no such element in the array, it returns
NULLπ
π SEE ALSO π
and that's the whole thing, bestie β short page, big brain π§ β¨ go read the friends up there in SEE ALSO if you wanna actually build an iarray, because this one only reads what's already there. iykyk π
sending you off with love from the <b>Library Functions Manual</b> π this is iarray_get(3), signing out ππ¦
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms