idn2_check_version(3)

πŸ“¦
version 2.3.8 Β· 5 versions
, in alpine 3.23, alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– idn2_check_version β€” the libidn2 manual page, but make it cute πŸ’–

okay bestie, so this is idn2_check_version(3), a lil function from libidn2 that's basically a vibe check for your library version. yes it's a whole manpage for one function. no we're not skipping anything. let's go πŸ¦‹


✨ NAME ✨

idn2_check_version β€” API function πŸ‘‘


🌸 SYNOPSIS 🌸

#include <idn2.h>

const char * idn2_check_version(const char * req_version);

like. it's giving "one include, one function, zero drama" πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * req_version β€” the version string you wanna compare against, or NULL. that's it. that's the whole arg. she's low maintenance πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

so what does she DO? she checks the IDN2 library version. iconic behaviour honestly. and not only that β€” you can also use her to literally read out the version of the library code you're running. two jobs, one function, main character energy fr fr πŸ‘‘

for a good req_version string, look at IDN2_VERSION β€” that one matches the version of the idn2.h header file. normally those two numbers match up all cute and consistent ✨ but heads up: if you're running an application that was built against an older libidn2 but linked against a newer libidn2 shared library, those two versions will be different. and that's the exact situation this function exists to catch. slay.

Return value: she checks that the library version is at minimum the one you handed her in req_version, and then returns the actual version string of the library. if the condition isn't met? she returns NULL. simple as that πŸ’€ and if you pass NULL in as req_version, no check happens at all β€” she just hands you the version string and minds her business. periodt.


😭 REPORTING BUGS 😭

found a bug? don't suffer in silence, tell the people:


Copyright Β© 2002-2025 Simon Josefsson.

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.

(yes you can share her around. she's generous like that 🫢)


🌈 SEE ALSO 🌈

the full documentation for libidn2 lives in a Texinfo manual, and if the info program and the libidn2 programs are properly installed at your site, this command:

info libidn2

should give you access to the complete manual ✨ as an alternative, you can grab the manual from:

https://www.gnu.org/software/libidn/libidn2/manual/

ngl, that's the whole page. one function, fully documented, no cap πŸ’…

mwah πŸ’‹ this was idn2_check_version(3) from libidn2, version 2.3.8 β€” go forth and version-check responsibly, bestie πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from