diff options
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 53e57ff0894f..49aeb0036863 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -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); } } |