aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorPamplemousse <xav.maso@gmail.com>2021-06-25 15:57:37 -0700
committerPamplemousse <xav.maso@gmail.com>2021-06-30 09:45:21 -0700
commit5be17a4b96fa4dbd512da4cba59f177cdbd84935 (patch)
treebd9211f8ef2d5c729f4bf1f9dad231a63b0cbd98 /src/libexpr/eval.cc
parentbf68c693dc5157c2be1f3a9f407dd1ce3761df78 (diff)
Allow to compile after `./configure --enable-gc=no`
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index ef9f8efca..ceca6e16b 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -64,7 +64,11 @@ static char * dupStringWithLen(const char * s, size_t size)
RootValue allocRootValue(Value * v)
{
+#if HAVE_BOEHMGC
return std::allocate_shared<Value *>(traceable_allocator<Value *>(), v);
+#else
+ return std::make_shared<Value *>(v);
+#endif
}