aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-03-19 13:50:01 +0100
committerEelco Dolstra <edolstra@gmail.com>2020-03-19 13:50:01 +0100
commitb244e65cdbc2949af70bd539bf8f3bd2fa952d07 (patch)
treed17654198deeb5814a618ec868c2ffc3e4dd7cc3 /src/nix
parentb79b81dd2d62d2363105c5c7a1d91be2df338ddf (diff)
nix repl: Scan NixRepl for GC roots
Fixes #3175.
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/repl.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index e6c811a7b..49418add2 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -32,6 +32,9 @@ extern "C" {
#include "command.hh"
#include "finally.hh"
+#define GC_INCLUDE_NEW
+#include <gc/gc_cpp.h>
+
namespace nix {
#define ESC_RED "\033[31m"
@@ -42,7 +45,7 @@ namespace nix {
#define ESC_CYA "\033[36m"
#define ESC_END "\033[0m"
-struct NixRepl
+struct NixRepl : gc
{
string curDir;
EvalState state;