about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-01T12·04+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-01T12·04+0000
commit7b851915bfbad1c561191a037a2924d2b3d2d398 (patch)
tree6505b7773c1117295d2b00a244379f741a20a915 /src/libexpr/eval.hh
parent95cc417d76f7d374ef63e0b49a2f83e7b9202b0c (diff)
* Improve sharing.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 34b658ce13e4..ae6b2106f487 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -112,6 +112,13 @@ static inline void mkThunk(Value & v, Env & env, Expr expr)
 }
 
 
+static inline void mkCopy(Value & v, Value & src)
+{
+    v.type = tCopy;
+    v.val = &src;
+}
+
+
 void mkString(Value & v, const char * s);
 void mkString(Value & v, const string & s, const PathSet & context = PathSet());
 void mkPath(Value & v, const char * s);