aboutsummaryrefslogtreecommitdiff
path: root/c/pl.cpp
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-08-02 23:50:58 +0200
committerJohn Ankarström <john@ankarstrom.se>2022-08-02 23:50:58 +0200
commit23dc657f0af27bdac887f8d18208d544cc9f010e (patch)
treea2656d96f11f879d6a4233fef736493a1cc39ba6 /c/pl.cpp
parentedce20642b6d177ee9877775cbfa9e05ebb4e404 (diff)
downloadEpisodeBrowser-23dc657f0af27bdac887f8d18208d544cc9f010e.tar.gz
Improve wstring_owner, rename to wchar_ptr.
The user-defined conversion function makes the interface a lot simpler AND safer.
Diffstat (limited to 'c/pl.cpp')
-rw-r--r--c/pl.cpp4
1 files changed, 2 insertions, 2 deletions
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 {};
}