mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
libexpr: Add and use pathAccessor
getter
This commit is contained in:
parent
e4df189123
commit
bc6b52aff0
2 changed files with 6 additions and 3 deletions
|
@ -2636,7 +2636,7 @@ void EvalState::assertEqValues(Value & v1, Value & v2, const PosIdx pos, std::st
|
|||
return;
|
||||
|
||||
case nPath:
|
||||
if (v1.payload.path.accessor != v2.payload.path.accessor) {
|
||||
if (v1.pathAccessor() != v2.pathAccessor()) {
|
||||
error<AssertionError>(
|
||||
"path '%s' is not equal to path '%s' because their accessors are different",
|
||||
ValuePrinter(*this, v1, errorPrintOptions),
|
||||
|
@ -2810,7 +2810,7 @@ bool EvalState::eqValues(Value & v1, Value & v2, const PosIdx pos, std::string_v
|
|||
case nPath:
|
||||
return
|
||||
// FIXME: compare accessors by their fingerprint.
|
||||
v1.payload.path.accessor == v2.payload.path.accessor
|
||||
v1.pathAccessor() == v2.pathAccessor()
|
||||
&& strcmp(v1.pathStr(), v2.pathStr()) == 0;
|
||||
|
||||
case nNull:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue