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:
parent
5d82d6e733
commit
9d380c0f76
5 changed files with 22 additions and 19 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue