1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

forceString(): Accept pos argument

This commit is contained in:
Eelco Dolstra 2014-11-25 10:23:36 +01:00
parent 976b949e4d
commit 4e340a983f
3 changed files with 5 additions and 5 deletions

View file

@ -870,7 +870,7 @@ static void prim_toFile(EvalState & state, const Pos & pos, Value * * args, Valu
{
PathSet context;
string name = state.forceStringNoCtx(*args[0], pos);
string contents = state.forceString(*args[1], context);
string contents = state.forceString(*args[1], context, pos);
PathSet refs;
@ -1427,7 +1427,7 @@ static void prim_hashString(EvalState & state, const Pos & pos, Value * * args,
throw Error(format("unknown hash type %1%, at %2%") % type % pos);
PathSet context; // discarded
string s = state.forceString(*args[1], context);
string s = state.forceString(*args[1], context, pos);
mkString(v, printHash(hashString(ht, s)), context);
};