about summary refs log tree commit diff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-03-31T19·52+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-03-31T19·52+0000
commit979f163615745db74f3a94a71818e66c75baf9ac (patch)
tree6351f54bc055ce988ab3d916d0cd162895518cf4 /src/libexpr/primops.cc
parentd8cd3115d8e1acc9e866c67265668d5268f2c1ec (diff)
* Handle string contexts. `nix-instantiate' can now correctly compute
  the `firefoxWrapper' attribute in Nixpkgs, and it's about 3 times
  faster than the trunk :-)

Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 31914a65dd18..e16cd2419c9f 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -588,7 +588,7 @@ static void prim_toFile(EvalState & state, Value * * args, Value & v)
 {
     PathSet context;
     string name = state.forceStringNoCtx(*args[0]);
-    string contents = state.forceString(*args[1]); // !!! context
+    string contents = state.forceString(*args[1], context);
 
     PathSet refs;
 
@@ -928,7 +928,7 @@ static void prim_toString(EvalState & state, Value * * args, Value & v)
 {
     PathSet context;
     string s = state.coerceToString(*args[0], context, true, false);
-    mkString(v, s.c_str()); // !!! context
+    mkString(v, s, context);
 }