1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 20:16:03 +01:00

libexpr: Use proxy ListView for all Value list accesses

This also makes it possible to make `payload` field private
in the `ValueStorage` class template.
This commit is contained in:
Sergei Zimmerman 2025-07-02 21:57:02 +03:00
parent c39cc00404
commit e73fcf7b53
No known key found for this signature in database
GPG key ID: A9B0B557CA632325
16 changed files with 309 additions and 116 deletions

View file

@ -73,7 +73,7 @@ json printValueAsJSON(EvalState & state, bool strict,
case nList: {
out = json::array();
int i = 0;
for (auto elem : v.listItems()) {
for (auto elem : v.listView()) {
try {
out.push_back(printValueAsJSON(state, strict, *elem, pos, context, copyToStore));
} catch (Error & e) {