From dea998b2f29eaad67b3003550fcfdf9d31045d4c Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Thu, 5 May 2022 20:26:10 -0600 Subject: [PATCH] traceable_allocator --- src/libcmd/command.hh | 2 +- src/libcmd/repl.cc | 2 +- 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, const Expr & expr, - const std::map & 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, const Expr &expr, - const std::map & extraEnv) + const ValMap & extraEnv) { auto repl = std::make_unique(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 ValMap; +#if HAVE_BOEHMGC + typedef std::map, traceable_allocator > > ValMap; +#else + typedef std::map ValMap; +#endif struct Env {