mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 00:08:07 +02:00
String value refactor
Related to https://github.com/NixOS/nix/pull/9047
This commit is contained in:
parent
c6e28d8da2
commit
550af113c6
1 changed files with 2 additions and 2 deletions
|
@ -171,7 +171,7 @@ const char * nix_get_string(nix_c_context * context, const Value * value)
|
|||
try {
|
||||
auto & v = check_value_not_null(value);
|
||||
assert(v.type() == nix::nString);
|
||||
return v.string.s;
|
||||
return v.c_str();
|
||||
}
|
||||
NIXC_CATCH_ERRS_NULL
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ const char * nix_get_path_string(nix_c_context * context, const Value * value)
|
|||
try {
|
||||
auto & v = check_value_not_null(value);
|
||||
assert(v.type() == nix::nPath);
|
||||
return v._path;
|
||||
return v.path().to_string().c_str();
|
||||
}
|
||||
NIXC_CATCH_ERRS_NULL
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue