diff --git a/src/libexpr/include/nix/expr/eval.hh b/src/libexpr/include/nix/expr/eval.hh index 2640dae39..0c7f9cf09 100644 --- a/src/libexpr/include/nix/expr/eval.hh +++ b/src/libexpr/include/nix/expr/eval.hh @@ -191,7 +191,7 @@ std::ostream & operator<<(std::ostream & os, const ValueType t); struct RegexCache; -std::shared_ptr makeRegexCache(); +ref makeRegexCache(); struct DebugTrace { @@ -372,6 +372,7 @@ public: const fetchers::Settings & fetchSettings; const EvalSettings & settings; + SymbolTable symbols; PosTable positions; @@ -504,7 +505,7 @@ private: /** * Cache used by prim_match(). */ - std::shared_ptr regexCache; + const ref regexCache; public: diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 5f06bf009..d87825a6d 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -4611,9 +4611,9 @@ struct RegexCache } }; -std::shared_ptr makeRegexCache() +ref makeRegexCache() { - return std::make_shared(); + return make_ref(); } void prim_match(EvalState & state, const PosIdx pos, Value ** args, Value & v)