1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

libexpr: Add and use pathStr getter

This commit is contained in:
Sergei Zimmerman 2025-06-12 19:57:46 +00:00
parent c041d71406
commit e4df189123
No known key found for this signature in database
GPG key ID: A9B0B557CA632325
4 changed files with 9 additions and 6 deletions

View file

@ -252,7 +252,7 @@ const char * nix_get_path_string(nix_c_context * context, const nix_value * valu
// We could use v.path().to_string().c_str(), but I'm concerned this
// crashes. Looks like .path() allocates a CanonPath with a copy of the
// string, then it gets the underlying data from that.
return v.payload.path.path;
return v.pathStr();
}
NIXC_CATCH_ERRS_NULL
}