PS_GET_OPAQUE(3)

πŸ’… PS_GET_OPAQUE πŸ’…

okay bestie, this is a page from the Library Functions Manual, section 3 β€” it's PS_GET_OPAQUE(3), and it's literally the shortest little bop in the pslib friend group. it's giving "small but essential", no cap. let's get into it 🫢


✨ NAME ✨

PS_get_opaque β€” returns the pointer which has been passed to PS_new2()


πŸŽ€ SYNOPSIS πŸŽ€

#include <pslib.h>

void * PS_get_opaque(PSDoc *psdoc)

🌸 DESCRIPTION 🌸

so here's the lore, bestie. when you make a brand new document with PS_new2(3), you're allowed to hand it some user data β€” your own little secret stash of a pointer. that data gets tucked away internally, and every single time the errorhandler gets called, that same data gets passed along to it. so it's always there, riding shotgun. πŸ’–

and later on, whenever you want it back? that's literally what this function is for. you call PS_get_opaque(), and boom β€” your pointer comes home. πŸ¦‹


⭐ RETURN VALUE ⭐

the pointer that you passed to PS_new2() in the first place. that's it, that's the whole vibe check. iconic.


🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

this manual page was written by Uwe Steinmann <uwe@steinmann.cx>. we stan a documentation king. πŸ’œ


fr fr, if you only remember one thing: whatever you gave PS_new2(), this gives it back. no notes. periodt. πŸ’…

this has been PS_GET_OPAQUE(3) from the Library Functions Manual, section 3, courtesy of the pslib gang β€” that's the source, that's the version, and the date is whatever your local man db says it is, i don't make the rules πŸŽ€βœ¨ bye bestie, mwah πŸ˜­πŸ’–

πŸ“¦ where this page comes from