libexpr: Replace Value::mkAttrs with constructor calls

The pseudo-constructor `Value::mkAttrs` would previously be called on an
default-constructed (under-initialized) `Value` to create a properly
initialized `Value` that represents an attribute set. This change
removes mkAttrs and constructs attr `Value`s directly.

Change-Id: I11cd801eefecd454a7a5b6229d6770d06a6a6964
This commit is contained in:
skye
2026-02-23 03:54:35 +00:00
committed by Skye
parent c2b61c5da3
commit d07bbb109e
16 changed files with 52 additions and 85 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ void emitTreeAttrs(
fmt("%s", std::put_time(std::gmtime(&*lastModified), "%Y%m%d%H%M%S")));
}
v.mkAttrs(attrs);
v = {NewValueAs::attrs, attrs};
}
std::string fixURI(std::string uri, EvalState & state, const std::string & defaultScheme = "file")