1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-30 07:33:16 +02:00

libexpr-c: Add nix_store_path_name

This commit is contained in:
Robert Hensing 2024-04-08 13:14:03 +02:00
parent a512f4eebc
commit f2522d4ecd
3 changed files with 22 additions and 2 deletions

View file

@ -128,6 +128,13 @@ nix_err nix_store_realise(
NIXC_CATCH_ERRS
}
void nix_store_path_name(const StorePath *store_path, void * callback, void * user_data)
{
std::string_view name = store_path->path.name();
((nix_get_string_callback) callback)(name.data(), name.size(), user_data);
}
void nix_store_path_free(StorePath * sp)
{
delete sp;