1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

C API: Add nix_clear_err

This commit is contained in:
Robert Hensing 2024-06-14 16:30:34 +02:00
parent afdd12be5e
commit 2dc7598779
3 changed files with 35 additions and 3 deletions

View file

@ -57,6 +57,12 @@ nix_err nix_set_err_msg(nix_c_context * context, nix_err err, const char * msg)
return err;
}
void nix_clear_err(nix_c_context * context)
{
if (context)
context->last_err_code = NIX_OK;
}
const char * nix_version_get()
{
return PACKAGE_VERSION;