mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Rename SearchPath to LookupPath and searchPath to lookupPath
This commit is contained in:
parent
8c4c2156bd
commit
40a6a9fdb8
29 changed files with 136 additions and 136 deletions
|
@ -1716,7 +1716,7 @@ static void prim_findFile(EvalState & state, const PosIdx pos, Value * * args, V
|
|||
{
|
||||
state.forceList(*args[0], pos, "while evaluating the first argument passed to builtins.findFile");
|
||||
|
||||
SearchPath searchPath;
|
||||
LookupPath lookupPath;
|
||||
|
||||
for (auto v2 : args[0]->listItems()) {
|
||||
state.forceAttrs(*v2, pos, "while evaluating an element of the list passed to builtins.findFile");
|
||||
|
@ -1744,15 +1744,15 @@ static void prim_findFile(EvalState & state, const PosIdx pos, Value * * args, V
|
|||
).atPos(pos).debugThrow();
|
||||
}
|
||||
|
||||
searchPath.elements.emplace_back(SearchPath::Elem {
|
||||
.prefix = SearchPath::Prefix { .s = prefix },
|
||||
.path = SearchPath::Path { .s = path },
|
||||
lookupPath.elements.emplace_back(LookupPath::Elem {
|
||||
.prefix = LookupPath::Prefix { .s = prefix },
|
||||
.path = LookupPath::Path { .s = path },
|
||||
});
|
||||
}
|
||||
|
||||
auto path = state.forceStringNoCtx(*args[1], pos, "while evaluating the second argument passed to builtins.findFile");
|
||||
|
||||
v.mkPath(state.findFile(searchPath, path, pos));
|
||||
v.mkPath(state.findFile(lookupPath, path, pos));
|
||||
}
|
||||
|
||||
static RegisterPrimOp primop_findFile(PrimOp {
|
||||
|
@ -4629,8 +4629,8 @@ void EvalState::createBaseEnv()
|
|||
});
|
||||
|
||||
/* Add a value containing the current Nix expression search path. */
|
||||
auto list = buildList(searchPath.elements.size());
|
||||
for (const auto & [n, i] : enumerate(searchPath.elements)) {
|
||||
auto list = buildList(lookupPath.elements.size());
|
||||
for (const auto & [n, i] : enumerate(lookupPath.elements)) {
|
||||
auto attrs = buildBindings(2);
|
||||
attrs.alloc("path").mkString(i.path.s);
|
||||
attrs.alloc("prefix").mkString(i.prefix.s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue