[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
310/376: forceString(): Accept pos argument
From: |
Ludovic Courtès |
Subject: |
310/376: forceString(): Accept pos argument |
Date: |
Wed, 28 Jan 2015 22:05:49 +0000 |
civodul pushed a commit to tag 1.8
in repository guix.
commit 4e340a983f928973d3915455d46a4bbadbc3269c
Author: Eelco Dolstra <address@hidden>
Date: Tue Nov 25 10:23:36 2014 +0100
forceString(): Accept pos argument
---
src/libexpr/eval.cc | 4 ++--
src/libexpr/eval.hh | 2 +-
src/libexpr/primops.cc | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 8177497..ebb2802 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1257,9 +1257,9 @@ void copyContext(const Value & v, PathSet & context)
}
-string EvalState::forceString(Value & v, PathSet & context)
+string EvalState::forceString(Value & v, PathSet & context, const Pos & pos)
{
- string s = forceString(v);
+ string s = forceString(v, pos);
copyContext(v, context);
return s;
}
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index d066f7f..8bf65c2 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -200,7 +200,7 @@ public:
inline void forceList(Value & v, const Pos & pos);
void forceFunction(Value & v, const Pos & pos); // either lambda or primop
string forceString(Value & v, const Pos & pos = noPos);
- string forceString(Value & v, PathSet & context);
+ string forceString(Value & v, PathSet & context, const Pos & pos = noPos);
string forceStringNoCtx(Value & v, const Pos & pos = noPos);
/* Return true iff the value `v' denotes a derivation (i.e. a
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index e6edffa..ed50c80 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -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);
};
- 243/376: Add primop ‘catAttrs’, (continued)
- 243/376: Add primop ‘catAttrs’, Ludovic Courtès, 2015/01/28
- 249/376: nix-copy-closure: Use strict, Ludovic Courtès, 2015/01/28
- 241/376: Tweak, Ludovic Courtès, 2015/01/28
- 304/376: Combine introduction / quick start parts, Ludovic Courtès, 2015/01/28
- 250/376: Remove unused @sshOpts flag, Ludovic Courtès, 2015/01/28
- 305/376: Update quick start section, Ludovic Courtès, 2015/01/28
- 306/376: Update installation section, Ludovic Courtès, 2015/01/28
- 308/376: Build derivations in a more predictable order, Ludovic Courtès, 2015/01/28
- 307/376: Don't create unnecessary substitution goals for derivations, Ludovic Courtès, 2015/01/28
- 309/376: More build-cache-failures -> build-cache-failure, Ludovic Courtès, 2015/01/28
- 310/376: forceString(): Accept pos argument,
Ludovic Courtès <=
- 311/376: Add a primop for regular expression pattern matching, Ludovic Courtès, 2015/01/28
- 312/376: Rely on XML catalogs to find the DocBook schemas and stylesheets, Ludovic Courtès, 2015/01/28
- 313/376: Intro: Mention binary caches, Ludovic Courtès, 2015/01/28
- 303/376: Manual: Bump date, Ludovic Courtès, 2015/01/28
- 315/376: Make all ExternalValueBase functions const, Ludovic Courtès, 2015/01/28
- 318/376: Shut up a warning, Ludovic Courtès, 2015/01/28
- 317/376: Fix another operator precedence issue found by Perl 5.20, Ludovic Courtès, 2015/01/28
- 322/376: Remove Fedora 18, 19 builds, Ludovic Courtès, 2015/01/28
- 319/376: Use posix_spawn to run the pager, Ludovic Courtès, 2015/01/28
- 321/376: Remove some platforms with too-old compilers, Ludovic Courtès, 2015/01/28