libexpr: use pascal strings for eval

this has no performance impact in any benchmarks we've run. nul bytes
are still used as implicit truncation points in many places all over:
rejecting them in all locations that treat them as a string end point
requires large changes such as using a proper path library everywhere

Change-Id: I936158bd435f6abf009a689adfbc24496262c578
This commit is contained in:
eldritch horrors
2025-10-11 12:57:57 +02:00
parent 53d172a308
commit b88a6e6f11
14 changed files with 175 additions and 96 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ namespace nix {
if (arg.type() != nPath) {
*result_listener << "Expected a path got " << arg.type();
return false;
} else if (std::string_view(arg.string().content) != p) {
} else if (arg.string().content->str() != p) {
*result_listener << "Expected a path that equals \"" << p
<< "\" but got: " << arg.path();
return false;