diff options
author | Ben Burdette <bburdette@protonmail.com> | 2022-05-05 20:26:10 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@protonmail.com> | 2022-05-05 20:26:10 -0600 |
commit | dea998b2f29eaad67b3003550fcfdf9d31045d4c (patch) | |
tree | 1cc35d8580fbcb2c999d49f788624075e0837a79 /src | |
parent | f400c5466d45d342709483799d9b9c2ac24cf967 (diff) |
traceable_allocator
Diffstat (limited to 'src')
-rw-r--r-- | src/libcmd/command.hh | 2 | ||||
-rw-r--r-- | src/libcmd/repl.cc | 2 | ||||
-rw-r--r-- | src/libexpr/eval.hh | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/libcmd/command.hh b/src/libcmd/command.hh index 354877bc5..454197b1c 100644 --- a/src/libcmd/command.hh +++ b/src/libcmd/command.hh @@ -276,6 +276,6 @@ void printClosureDiff( void runRepl( ref<EvalState> evalState, const Expr & expr, - const std::map<std::string, Value *> & extraEnv); + const ValMap & extraEnv); } diff --git a/src/libcmd/repl.cc b/src/libcmd/repl.cc index 37e454b21..950195572 100644 --- a/src/libcmd/repl.cc +++ b/src/libcmd/repl.cc @@ -1016,7 +1016,7 @@ std::ostream & NixRepl::printValue(std::ostream & str, Value & v, unsigned int m void runRepl( ref<EvalState> evalState, const Expr &expr, - const std::map<std::string, Value *> & extraEnv) + const ValMap & extraEnv) { auto repl = std::make_unique<NixRepl>(evalState); diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 22f034e27..65b1466ea 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -37,7 +37,11 @@ struct PrimOp const char * doc = nullptr; }; -typedef std::map<std::string, Value *> ValMap; +#if HAVE_BOEHMGC + typedef std::map<std::string, Value *, std::less<std::string>, traceable_allocator<std::pair<const std::string, Value *> > > ValMap; +#else + typedef std::map<std::string, Value *> ValMap; +#endif struct Env { |