From b3c9166b23aebbbfcbe65ea59e7ea18d876d45db Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 22 May 2020 16:48:30 +0100 Subject: refactor(3p/nix/libexpr): state->allocBindings -> Bindings::NewGC EvalState::allocBindings had little to do with Bindings, other than returning them, and didn't belong in that class. --- third_party/nix/src/libexpr/get-drvs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'third_party/nix/src/libexpr/get-drvs.cc') diff --git a/third_party/nix/src/libexpr/get-drvs.cc b/third_party/nix/src/libexpr/get-drvs.cc index 822bff369938..6d4ad33be063 100644 --- a/third_party/nix/src/libexpr/get-drvs.cc +++ b/third_party/nix/src/libexpr/get-drvs.cc @@ -293,7 +293,7 @@ bool DrvInfo::queryMetaBool(const std::string& name, bool def) { void DrvInfo::setMeta(const std::string& name, Value* v) { getMeta(); Bindings* old = meta; - meta = state->allocBindings(1 + (old != nullptr ? old->size() : 0)); + meta = Bindings::NewGC(); Symbol sym = state->symbols.Create(name); if (old != nullptr) { for (auto i : *old) { -- cgit 1.4.1