diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-31T18·28+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-07-31T18·28+0200 |
commit | 2bac04c5ff66092cf1cb42096feb3554a92fa98e (patch) | |
tree | b84b0576b9acba4f50594d206d65305e40f87882 /src/libexpr | |
parent | 75837651f15fc3c451ae54afbb5927c1abe329c5 (diff) |
Fix stack consumption
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/eval-inline.hh | 6 | ||||
-rw-r--r-- | src/libexpr/eval.cc | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index 4abc485aa471..8dee5ee46862 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -8,9 +8,9 @@ namespace nix { -LocalNoInlineNoReturn(void throwEvalError(const FormatOrString & fs)) +LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos)) { - throw EvalError(fs); + throw EvalError(format(s) % pos); } LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) @@ -44,7 +44,7 @@ void EvalState::forceValue(Value & v, const Pos & pos) else if (v.type == tApp) callFunction(*v.app.left, *v.app.right, v, noPos); else if (v.type == tBlackhole) - throwEvalError(format("infinite recursion encountered, at %1%") % pos); + throwEvalError("infinite recursion encountered, at %1%", pos); } diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index ec02e61b093f..74f88e498fed 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -358,11 +358,6 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2)) throw EvalError(format(s) % s2); } -LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos)) -{ - throw EvalError(format(s) % pos); -} - LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2, const Pos & pos)) { throw EvalError(format(s) % s2 % pos); |