diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-23T03·43+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-23T05·18+0100 |
commit | da4ca4e02f59d8d69f9996bd8de2f20f72d1d5ff (patch) | |
tree | 553fe5528a19aff727295a33a2911fd5bd267b74 /third_party/nix/src/libexpr/eval.hh | |
parent | 92792264f78ce95c08fdd802110ddad7956c0758 (diff) |
chore(3p/nix/libexpr): Minor readability improvements in eval/value r/820
Diffstat (limited to 'third_party/nix/src/libexpr/eval.hh')
-rw-r--r-- | third_party/nix/src/libexpr/eval.hh | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh index 73e35c9b2ce9..03dd275edc4e 100644 --- a/third_party/nix/src/libexpr/eval.hh +++ b/third_party/nix/src/libexpr/eval.hh @@ -53,6 +53,10 @@ typedef std::list<SearchPathElem> SearchPath; /* Initialise the Boehm GC, if applicable. */ void initGC(); +typedef std::map<Path, Expr*, std::less<Path>, + traceable_allocator<std::pair<const Path, Expr*>>> + FileParseCache; + class EvalState { public: SymbolTable symbols; @@ -79,23 +83,12 @@ class EvalState { SrcToStore srcToStore; /* A cache from path names to parse trees. */ -#if HAVE_BOEHMGC - typedef std::map<Path, Expr*, std::less<Path>, - traceable_allocator<std::pair<const Path, Expr*>>> - FileParseCache; -#else - typedef std::map<Path, Expr*> FileParseCache; -#endif FileParseCache fileParseCache; /* A cache from path names to values. */ -#if HAVE_BOEHMGC typedef std::map<Path, Value, std::less<Path>, traceable_allocator<std::pair<const Path, Value>>> FileEvalCache; -#else - typedef std::map<Path, Value> FileEvalCache; -#endif FileEvalCache fileEvalCache; SearchPath searchPath; |