1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 12:41:15 +02:00

C API: add more tests

This commit is contained in:
José Luis Lafuente 2024-02-25 21:21:05 +01:00 committed by José Luis Lafuente
parent 2e1dbbe307
commit 1093ab64a2
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
6 changed files with 86 additions and 26 deletions

View file

@ -382,13 +382,13 @@ nix_err nix_init_string(nix_c_context * context, Value * value, const char * str
NIXC_CATCH_ERRS
}
nix_err nix_init_path_string(nix_c_context * context, Value * value, const char * str)
nix_err nix_init_path_string(nix_c_context * context, EvalState * s, Value * value, const char * str)
{
if (context)
context->last_err_code = NIX_OK;
try {
auto & v = check_value_not_null(value);
v.mkPath(std::string_view(str));
v.mkPath(s->state.rootPath(nix::CanonPath(str)));
}
NIXC_CATCH_ERRS
}