Closed enkore closed 6 years ago
This is intentionally not documented, because it is not portable across all platforms.
It's probably better not to document something than document something that sometimes work.
Given normal use of errno I also wouldn't expect any portability issues.
Docs:
Sometimes it will set errno as well, e.g. if Sodium doesn't support it on the build platform, or if it is running on Windows.
While I noticed this in this specific example first, many Sodium functions set errno directly, but this is usually not documented. I've only noticed documentation on interaction with errno regarding sodium_malloc. I'm not sure if this is important enough to address, since it's probably a lot of work to comb through all public APIs and check how they behave regarding errno. Especially with platform-dependent functions having multiple implementations.