From 23dc657f0af27bdac887f8d18208d544cc9f010e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Tue, 2 Aug 2022 23:50:58 +0200 Subject: Improve wstring_owner, rename to wchar_ptr. The user-defined conversion function makes the interface a lot simpler AND safer. --- c/pl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'c/pl.cpp') diff --git a/c/pl.cpp b/c/pl.cpp index 1dc22fb..8b3fcbe 100644 --- a/c/pl.cpp +++ b/c/pl.cpp @@ -90,11 +90,11 @@ int Query::NextSolution() } /* Convert Prolog term to wide characters. */ -wstring_owner PlString(const term_t t, const int flags) +wchar_ptr PlString(const term_t t, const int flags) { char* s; if (PL_get_chars(t, &s, flags)) - return {wstring_owner::from_narrow(s)}; + return {wchar_ptr::from_narrow(s)}; else return {}; } -- cgit v1.2.3