1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-05 04:01:47 +02:00

C API: clarify some documentation

This commit is contained in:
Yorick van Pelt 2023-08-28 16:42:59 +02:00 committed by José Luis Lafuente
parent 5d82d6e733
commit 9d380c0f76
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
5 changed files with 22 additions and 19 deletions

View file

@ -103,7 +103,7 @@ StorePath *nix_store_parse_path(nix_c_context *context, Store *store,
nix_err nix_store_build(nix_c_context *context, Store *store, StorePath *path,
void *userdata,
void (*iter)(void *userdata, const char *,
void (*callback)(void *userdata, const char *,
const char *)) {
if (context)
context->last_err_code = NIX_OK;
@ -114,11 +114,11 @@ nix_err nix_store_build(nix_c_context *context, Store *store, StorePath *path,
.outputs = nix::OutputsSpec::All{},
},
});
if (iter) {
if (callback) {
for (auto &[outputName, outputPath] :
store->ptr->queryDerivationOutputMap(path->path)) {
auto op = store->ptr->printStorePath(outputPath);
iter(userdata, outputName.c_str(), op.c_str());
callback(userdata, outputName.c_str(), op.c_str());
}
}
}