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.
This commit is contained in:
parent
e24466c795
commit
b3c9166b23
10 changed files with 14 additions and 15 deletions
4
third_party/nix/src/libexpr/eval.cc
vendored
4
third_party/nix/src/libexpr/eval.cc
vendored
|
|
@ -372,7 +372,7 @@ EvalState::EvalState(const Strings& _searchPath, const ref<Store>& store)
|
|||
|
||||
clearValue(vEmptySet);
|
||||
vEmptySet.type = tAttrs;
|
||||
vEmptySet.attrs = allocBindings(0);
|
||||
vEmptySet.attrs = Bindings::NewGC();
|
||||
|
||||
createBaseEnv();
|
||||
}
|
||||
|
|
@ -857,7 +857,7 @@ void ExprAttrs::eval(EvalState& state, Env& env, Value& v) {
|
|||
if (hasOverrides) {
|
||||
Value* vOverrides = v.attrs->find(overrides->first)->second.value;
|
||||
state.forceAttrs(*vOverrides);
|
||||
Bindings* newBnds = state.allocBindings(/* capacity = */ 0);
|
||||
Bindings* newBnds = Bindings::NewGC();
|
||||
for (auto& i : *v.attrs) { // TODO(tazjin): copy constructor?
|
||||
newBnds->push_back(i.second);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue