diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-22T15·48+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-22T15·57+0100 |
commit | b3c9166b23aebbbfcbe65ea59e7ea18d876d45db (patch) | |
tree | 48b9e56e7bf8608e320fdc1420597f4c026bbb10 /third_party/nix/src/libexpr/get-drvs.cc | |
parent | e24466c7951a96b35bea947e6e6854f277eda9d7 (diff) |
refactor(3p/nix/libexpr): state->allocBindings -> Bindings::NewGC r/805
EvalState::allocBindings had little to do with Bindings, other than returning them, and didn't belong in that class.
Diffstat (limited to 'third_party/nix/src/libexpr/get-drvs.cc')
-rw-r--r-- | third_party/nix/src/libexpr/get-drvs.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |