aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThéophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>2022-12-13 10:36:59 +0100
committerGitHub <noreply@github.com>2022-12-13 10:36:59 +0100
commit6e31d27cba459a0aca697d118b5423ec48ad3969 (patch)
tree00705001572c75c60d49ff18f3870189ba80f7da /src
parentedb54c62e6c66f3d26642c024d92bd20b30abf85 (diff)
parent672ee882318f3ae97de068a44e4c09bdf82d04ef (diff)
Merge pull request #6741 from Mindavi/nix-no-gc
support building with --enable-gc=no
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/eval.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 0d9226d3b..aee0636b0 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -45,7 +45,7 @@ static char * allocString(size_t size)
#if HAVE_BOEHMGC
t = (char *) GC_MALLOC_ATOMIC(size);
#else
- t = malloc(size);
+ t = (char *) malloc(size);
#endif
if (!t) throw std::bad_alloc();
return t;
@@ -471,9 +471,6 @@ EvalState::EvalState(
#if HAVE_BOEHMGC
, valueAllocCache(std::allocate_shared<void *>(traceable_allocator<void *>(), nullptr))
, env1AllocCache(std::allocate_shared<void *>(traceable_allocator<void *>(), nullptr))
-#else
- , valueAllocCache(std::make_shared<void *>(nullptr))
- , env1AllocCache(std::make_shared<void *>(nullptr))
#endif
, baseEnv(allocEnv(128))
, staticBaseEnv{std::make_shared<StaticEnv>(false, nullptr)}