From 550af113c6877654ce29e457a09a0ba46169ebbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Tue, 28 Nov 2023 15:05:04 +0100 Subject: [PATCH] String value refactor Related to https://github.com/NixOS/nix/pull/9047 --- src/libexpr/c/nix_api_value.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libexpr/c/nix_api_value.cc b/src/libexpr/c/nix_api_value.cc index 2348b75ed..d013d5333 100644 --- a/src/libexpr/c/nix_api_value.cc +++ b/src/libexpr/c/nix_api_value.cc @@ -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 }