1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02:00

Get rid of an intermediary on the stack

This commit is contained in:
Eelco Dolstra 2013-11-07 12:44:14 +00:00
parent 8d6418d46e
commit 4badd7ed17
2 changed files with 17 additions and 13 deletions

View file

@ -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);
}
}