git: 3d91e5d58581 - stable/14 - libucl: Add a ucl::Ucl::forced_string_value method

From: Dag-Erling Smørgrav <des_at_FreeBSD.org>
Date: Thu, 02 Oct 2025 08:20:58 UTC
The branch stable/14 has been updated by des:

URL: https://cgit.FreeBSD.org/src/commit/?id=3d91e5d58581e000932854e4acb9cc722f01826a

commit 3d91e5d58581e000932854e4acb9cc722f01826a
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-08-04 19:38:06 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-10-02 07:28:58 +0000

    libucl: Add a ucl::Ucl::forced_string_value method
    
    This is a wrapper around ucl_object_tostring_forced.
    
    Sponsored by:   Chelsio Communications
    Pull Request:   https://github.com/freebsd/freebsd-src/pull/1794
    
    (cherry picked from commit 47586ffc8bde236bab65da05ad3c0a660709ba96)
---
 contrib/libucl/include/ucl++.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/contrib/libucl/include/ucl++.h b/contrib/libucl/include/ucl++.h
index fb63430d400d..1cd17eac0c75 100644
--- a/contrib/libucl/include/ucl++.h
+++ b/contrib/libucl/include/ucl++.h
@@ -396,6 +396,11 @@ public:
 		return default_val;
 	}
 
+	std::string forced_string_value () const
+	{
+		return ucl_object_tostring_forced(obj.get());
+	}
+
 	size_t size () const
 	{
 		if (type () == UCL_ARRAY) {