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 agnutls_session_ttype. 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):
- report bugs to
<bugs@gnutls.org>π§ - home page:
https://www.gnutls.orgπ
π COPYRIGHT π
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
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms