gnutls_session_get_ptr(3)

πŸ’– gnutls_session_get_ptr(3) πŸ’–

okay bestie, so this one's a lil function from the gnutls manual, and honestly? it's giving "tiny but crucial." sit with me.


✨ NAME ✨

gnutls_session_get_ptr β€” literally just an API function, that's the whole name, no notes πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void * gnutls_session_get_ptr(gnutls_session_t session);

like, yes, that's the whole thing. one include, one call. she's lowkey minimal and we love that for her πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” bestie this is just a gnutls_session_t type. that's it. that's the whole argument. she takes one (1) session and she takes it seriously πŸ’œ

🌈 DESCRIPTION 🌈

okay so the vibe here: you're grabbing the user pointer for the session. it's so useful in callbacks, fr fr β€” that's like, the entire point of her existence.

and where did that pointer come from?? not from the void, bestie. it's the exact pointer you set earlier with gnutls_session_set_ptr(). it's a matching set, like a little friendship bracelet 🫢 set it, get it. iconic behaviour honestly.


⭐ RETURNS ⭐

she hands you back the user-given pointer from the session structure πŸ’–

and if it was never set?? you get NULL. no pointer, no vibes, just NULL. so always vibe check that return value, iykyk 😭


πŸ› REPORTING BUGS πŸ›

found a bug? don't suffer in silence, tell the girlies (the gnutls devs):


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

and the licensing? genuinely so generous of them: 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. so like, go off, just keep the receipts πŸ’…


πŸ’€ SEE ALSO πŸ’€

the full documentation for gnutls is maintained as a Texinfo manual. so if the /usr/share/doc/gnutls/ directory does not contain the HTML form, bestie, you gotta go visit:

https://www.gnutls.org/manual/

like, actually go there. the manual is the main character. 🌈


and that's the whole page, bestie!! πŸŽ€ this one's from gnutls, version 3.8.13 β€” sending you all the pointer-getting energy, mwah πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from