mirror of
https://github.com/NixOS/nix
synced 2025-06-26 20:01:15 +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 {
|
try {
|
||||||
auto & v = check_value_not_null(value);
|
auto & v = check_value_not_null(value);
|
||||||
assert(v.type() == nix::nString);
|
assert(v.type() == nix::nString);
|
||||||
return v.string.s;
|
return v.c_str();
|
||||||
}
|
}
|
||||||
NIXC_CATCH_ERRS_NULL
|
NIXC_CATCH_ERRS_NULL
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ const char * nix_get_path_string(nix_c_context * context, const Value * value)
|
||||||
try {
|
try {
|
||||||
auto & v = check_value_not_null(value);
|
auto & v = check_value_not_null(value);
|
||||||
assert(v.type() == nix::nPath);
|
assert(v.type() == nix::nPath);
|
||||||
return v._path;
|
return v.path().to_string().c_str();
|
||||||
}
|
}
|
||||||
NIXC_CATCH_ERRS_NULL
|
NIXC_CATCH_ERRS_NULL
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue