mirror of
https://github.com/NixOS/nix
synced 2025-06-27 04:21:16 +02:00
Remove non-method mk<X> functions
This commit is contained in:
parent
cc08364315
commit
263a8d293c
9 changed files with 99 additions and 121 deletions
|
@ -17,7 +17,7 @@ static void prim_hasContext(EvalState & state, const Pos & pos, Value * * args,
|
|||
{
|
||||
PathSet context;
|
||||
state.forceString(*args[0], context, pos);
|
||||
mkBool(v, !context.empty());
|
||||
v.mkBool(!context.empty());
|
||||
}
|
||||
|
||||
static RegisterPrimOp primop_hasContext("__hasContext", 1, prim_hasContext);
|
||||
|
@ -109,9 +109,9 @@ static void prim_getContext(EvalState & state, const Pos & pos, Value * * args,
|
|||
for (const auto & info : contextInfos) {
|
||||
auto infoAttrs = state.buildBindings(3);
|
||||
if (info.second.path)
|
||||
mkBool(infoAttrs.alloc(sPath), true);
|
||||
infoAttrs.alloc(sPath).mkBool(true);
|
||||
if (info.second.allOutputs)
|
||||
mkBool(infoAttrs.alloc(sAllOutputs), true);
|
||||
infoAttrs.alloc(sAllOutputs).mkBool(true);
|
||||
if (!info.second.outputs.empty()) {
|
||||
auto & outputsVal = infoAttrs.alloc(state.sOutputs);
|
||||
state.mkList(outputsVal, info.second.outputs.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue