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:
parent
c041d71406
commit
e4df189123
4 changed files with 9 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue