mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
* Improve sharing.
This commit is contained in:
parent
95cc417d76
commit
7b851915bf
3 changed files with 25 additions and 19 deletions
|
@ -264,7 +264,7 @@ void EvalState::cloneAttrs(Value & src, Value & dst)
|
|||
{
|
||||
mkAttrs(dst);
|
||||
foreach (Bindings::iterator, i, *src.attrs)
|
||||
(*dst.attrs)[i->first] = i->second; // !!! sharing?
|
||||
mkCopy((*dst.attrs)[i->first], i->second);
|
||||
}
|
||||
|
||||
|
||||
|
@ -601,8 +601,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v)
|
|||
mkThunk(v, env2, def);
|
||||
} else {
|
||||
attrsUsed++;
|
||||
v.type = tCopy;
|
||||
v.val = &j->second;
|
||||
mkCopy(v, j->second);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue