diff options
Diffstat (limited to 'third_party/nix/src/libexpr/eval.cc')
-rw-r--r-- | third_party/nix/src/libexpr/eval.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/third_party/nix/src/libexpr/eval.cc b/third_party/nix/src/libexpr/eval.cc index 0f3b7fabe029..16e6907214c9 100644 --- a/third_party/nix/src/libexpr/eval.cc +++ b/third_party/nix/src/libexpr/eval.cc @@ -338,8 +338,6 @@ EvalState::EvalState(const Strings& _searchPath, const ref<Store>& store) assert(gcInitialised); - static_assert(sizeof(Env) <= 16, "environment must be <= 16 bytes"); - /* Initialise the Nix expression search path. */ if (!evalSettings.pureEval) { Strings paths = parseNixPath(getEnv("NIX_PATH", "")); @@ -637,13 +635,9 @@ Env& EvalState::allocEnv(size_t size) { nrEnvs++; nrValuesInEnvs += size; - Env* env = (Env*)allocBytes(sizeof(Env) + size * sizeof(Value*)); - env->size = (decltype(Env::size))size; + Env* env = new Env(size); env->type = Env::Plain; - /* We assume that env->values has been cleared by the allocator; maybeThunk() - * and lookupVar fromWith expect this. */ - return *env; } |