mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
prim_match: Use state.vNull
This commit is contained in:
parent
3e6730ee62
commit
0b08dd45b0
1 changed files with 1 additions and 1 deletions
|
@ -4004,7 +4004,7 @@ void prim_match(EvalState & state, const PosIdx pos, Value * * args, Value & v)
|
||||||
auto list = state.buildList(match.size() - 1);
|
auto list = state.buildList(match.size() - 1);
|
||||||
for (const auto & [i, v2] : enumerate(list))
|
for (const auto & [i, v2] : enumerate(list))
|
||||||
if (!match[i + 1].matched)
|
if (!match[i + 1].matched)
|
||||||
(v2 = state.allocValue())->mkNull();
|
v2 = &state.vNull;
|
||||||
else
|
else
|
||||||
(v2 = state.allocValue())->mkString(match[i + 1].str());
|
(v2 = state.allocValue())->mkString(match[i + 1].str());
|
||||||
v.mkList(list);
|
v.mkList(list);
|
||||||
|
|
Loading…
Reference in a new issue