aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/value.hh
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-04-16 18:33:10 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-04-16 18:33:10 +0200
commitf89349f07eda66dea2aa3b70bdc2c5c649406bdc (patch)
tree9ff9148956592d29fc1c7e45ccf4dfc64b2457b5 /src/libexpr/value.hh
parent0858738355dd9bdb20a723f15629c423fe14a7b1 (diff)
parentefaffaa9d1de38efecb718aa7a99ba1f2e342ade (diff)
Merge remote-tracking branch 'origin/master' into flakes
Diffstat (limited to 'src/libexpr/value.hh')
-rw-r--r--src/libexpr/value.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh
index 60de60c67..1a0738241 100644
--- a/src/libexpr/value.hh
+++ b/src/libexpr/value.hh
@@ -258,12 +258,17 @@ void mkPath(Value & v, const char * s);
#if HAVE_BOEHMGC
-typedef std::vector<Value *, gc_allocator<Value *> > ValueVector;
-typedef std::map<Symbol, Value *, std::less<Symbol>, gc_allocator<std::pair<const Symbol, Value *> > > ValueMap;
+typedef std::vector<Value *, traceable_allocator<Value *> > ValueVector;
+typedef std::map<Symbol, Value *, std::less<Symbol>, traceable_allocator<std::pair<const Symbol, Value *> > > ValueMap;
#else
typedef std::vector<Value *> ValueVector;
typedef std::map<Symbol, Value *> ValueMap;
#endif
+/* A value allocated in traceable memory. */
+typedef std::shared_ptr<Value *> RootValue;
+
+RootValue allocRootValue(Value * v);
+
}