ZT_PACK_POINTER(3)

πŸ’– zt_pack_pointer β€” the NAME section, bestie πŸ’–

okay so first things first, this whole thing lives in the LOCAL manual, and it's literally called zt_pack_pointer β€” and what it does is pack an opaque pointer into a variant. that's the whole vibe. that's the assignment. πŸŽ€


✨ SYNOPSIS ✨

like, here's the tea, copy it exactly bestie:

#include <zt.h>

zt_value
zt_pack_pointer(const void *value, const char *source);

πŸ¦‹ that's it. that's the whole function signature. slay.


🌸 DESCRIPTION 🌸

so zt_pack_pointer takes an opaque pointer β€” yes, opaque, we don't ask questions about what's inside it, we respect its privacy πŸ’… β€” and it also takes the string that describes the expression you evaluated to get that pointer, and it packs both of them into a variant-like zt_value. two things in, one adorable little zt_value out. it's giving efficient. it's giving wrapped up with a bow. 🎁

and the source argument? bestie, it gets retained by the value β€” like, the zt_value keeps it around, it does not let go β€” and it's typically a constant string literal that the preprocessor produced. iykyk. the preprocessor is the main character here, honestly. πŸ‘‘


🧚 IMPLEMENTATION NOTES 🧚

real talk for a second: zt_pack_pointer is only provided as a static inline function. that's it. that's the only way it comes. no cap. πŸ’€

🌈 RETURN VALUES 🌈

it returns the packed value. periodt. πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

okay so here's the list, and i am being so fr fr right now β€” i am copying these exactly as they appear, duplicates and all, because the rule is we do not edit the manpage, we only serve cunt πŸ’…:

(yes bestie, zt_pack_pointer shows up a lot in its own SEE ALSO. that's not me being messy, that's literally what the page says. iconic behaviour honestly. ✨)


πŸ‘‘ HISTORY πŸ‘‘

zt_pack_pointer first appeared in libzt 0.1. a true original. a legend. the blueprint. πŸŽ€


🫢 AUTHORS 🫢

shoutout to Zygmunt Krynicki <me@zygoon.pl> for bringing this little cutie into the world. thank you for your service, king. πŸ’œ


and that's the whole page bestie!! πŸ’–βœ¨ this was libzt 0.3.1, dated January 12, 2020 β€” mwah, obsessed, go pack a pointer, you've got this πŸ¦‹πŸŒΈ