mirror of
https://github.com/NixOS/nix
synced 2025-06-25 02:21:16 +02:00
symbol-table: reference entries instead of allocating Value
s
This commit is contained in:
parent
94bbaddb93
commit
ed4e512dcd
4 changed files with 19 additions and 12 deletions
|
@ -90,6 +90,11 @@ std::string printValue(EvalState & state, Value & v)
|
|||
return out.str();
|
||||
}
|
||||
|
||||
Value * Value::toPtr(SymbolStr str) noexcept
|
||||
{
|
||||
return const_cast<Value *>(str.valuePtr());
|
||||
}
|
||||
|
||||
void Value::print(EvalState & state, std::ostream & str, PrintOptions options)
|
||||
{
|
||||
printValue(state, str, *this, options);
|
||||
|
@ -919,11 +924,6 @@ void Value::mkStringMove(const char * s, const NixStringContext & context)
|
|||
mkString(s, encodeContext(context));
|
||||
}
|
||||
|
||||
void Value::mkString(const SymbolStr & s)
|
||||
{
|
||||
mkString(s.c_str(), nullptr);
|
||||
}
|
||||
|
||||
void Value::mkPath(const SourcePath & path)
|
||||
{
|
||||
mkPath(&*path.accessor, makeImmutableString(path.path.abs()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue