about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-04-01T09·55+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-04-01T09·55+0000
commit71f026292ba1b401237a16ab6e0fb57c36c93df5 (patch)
treecb8f403db6cf31755db25b0a8db461aacae302dd /src/libexpr/eval.cc
parentdc31305b381f69de5ac5fd4776df1a802045ff00 (diff)
* Make `derivation' lazy again for performance. It also turns out
  that there are some places in Nixpkgs (php_configurable /
  composableDerivation, it seems) that call `derivation' with
  incorrect arguments (namely, the `name' attribute missing) but get
  away with it because of laziness.

Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 2bfcdac07edc..4277c65ea7b9 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -159,14 +159,6 @@ LocalNoInline(void addErrorPrefix(Error & e, const char * s, const string & s2,
 }
 
 
-static void mkThunk(Value & v, Env & env, Expr expr)
-{
-    v.type = tThunk;
-    v.thunk.env = &env;
-    v.thunk.expr = expr;
-}
-
-
 void mkString(Value & v, const char * s)
 {
     v.type = tString;
@@ -179,7 +171,7 @@ void mkString(Value & v, const string & s, const PathSet & context)
 {
     mkString(v, s.c_str());
     if (!context.empty()) {
-        unsigned int len = 0, n = 0;
+        unsigned int n = 0;
         v.string.context = new const char *[context.size() + 1];
         foreach (PathSet::const_iterator, i, context) 
             v.string.context[n++] = strdup(i->c_str());