about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-13T15·44+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-13T15·44+0000
commit73992371a3bc16b27b22e53d5f7ae600dea9cf60 (patch)
treed1e5db8cea5caacff34ac4e9b61195b97dbd9ceb /src/libexpr
parentd46b4262dc84689c3916583b91ed9fc6dafefdd6 (diff)
* Refactoring to support SHA-1.
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 41b444b20d44..fe9a601ea107 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -60,7 +60,7 @@ static Path copyAtom(EvalState & state, const Path & srcPath)
 
     Hash drvHash = hashDerivation(state, ne);
     Path drvPath = writeTerm(unparseStoreExpr(ne), "");
-    state.drvHashes[drvPath] = drvHash;
+    state.drvHashes.insert(make_pair(drvPath, drvHash));
 
     state.drvRoots[drvPath] = ne.closure.roots;
 
@@ -118,7 +118,7 @@ static void processBinding(EvalState & state, Expr e, StoreExpr & ne,
             PathSet drvRoots;
             drvRoots.insert(evalPath(state, a));
             
-            state.drvHashes[drvPath] = drvHash;
+            state.drvHashes.insert(make_pair(drvPath, drvHash));
             state.drvRoots[drvPath] = drvRoots;
 
             ss.push_back(addInput(state, drvPath, ne));
@@ -188,7 +188,7 @@ static Expr primDerivation(EvalState & state, const ATermVector & _args)
     ne.type = StoreExpr::neDerivation;
 
     string drvName;
-    Hash outHash;
+    Hash outHash(htMD5);
     bool outHashGiven = false;
 
     for (ATermIterator i(attrs.keys()); i; ++i) {