diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2022-12-13 10:36:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-13 10:36:59 +0100 |
commit | 6e31d27cba459a0aca697d118b5423ec48ad3969 (patch) | |
tree | 00705001572c75c60d49ff18f3870189ba80f7da /src | |
parent | edb54c62e6c66f3d26642c024d92bd20b30abf85 (diff) | |
parent | 672ee882318f3ae97de068a44e4c09bdf82d04ef (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.cc | 5 |
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)} |