about summary refs log tree commit diff
path: root/src/libexpr/eval-inline.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-07T12·44+0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-11-12T11·32+0000
commit4badd7ed17b4628d3a8d96e21c900aa91004daaf (patch)
treec117ee6b001f00480f69f79799785a662c573459 /src/libexpr/eval-inline.hh
parent8d6418d46e5f8a2f31417ba363efd2785c49b2eb (diff)
Get rid of an intermediary on the stack
Diffstat (limited to 'src/libexpr/eval-inline.hh')
-rw-r--r--src/libexpr/eval-inline.hh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh
index ec0206eb01a7..5801a20c3b10 100644
--- a/src/libexpr/eval-inline.hh
+++ b/src/libexpr/eval-inline.hh
@@ -12,9 +12,9 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s))
     throw EvalError(s);
 }
 
-LocalNoInlineNoReturn(void throwTypeError(const char * s, const string & s2))
+LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v))
 {
-    throw TypeError(format(s) % s2);
+    throw TypeError(format(s) % showType(v));
 }
 
 
@@ -45,7 +45,7 @@ inline void EvalState::forceAttrs(Value & v)
 {
     forceValue(v);
     if (v.type != tAttrs)
-        throwTypeError("value is %1% while a set was expected", showType(v));
+        throwTypeError("value is %1% while a set was expected", v);
 }
 
 
@@ -53,7 +53,7 @@ inline void EvalState::forceList(Value & v)
 {
     forceValue(v);
     if (v.type != tList)
-        throwTypeError("value is %1% while a list was expected", showType(v));
+        throwTypeError("value is %1% while a list was expected", v);
 }
 
 }