Extract a Value method to set the eval cache
This commit is contained in:
@@ -1813,6 +1813,13 @@ ValueCache & Value::getEvalCache()
|
||||
|
||||
ValueCache ValueCache::empty = ValueCache(nullptr);
|
||||
|
||||
void Value::setEvalCache(ValueCache & newCache)
|
||||
{
|
||||
if (internalType == tAttrs) {
|
||||
attrs->eval_cache = newCache;
|
||||
}
|
||||
}
|
||||
|
||||
string EvalState::forceString(Value & v, PathSet & context, const Pos & pos)
|
||||
{
|
||||
string s = forceString(v, pos);
|
||||
|
||||
@@ -353,6 +353,7 @@ public:
|
||||
std::vector<std::pair<Path, std::string>> getContext();
|
||||
|
||||
ValueCache & getEvalCache();
|
||||
void setEvalCache(ValueCache &);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user