From 03fe36165b6767bc4e0d26bf1b1de38fdff3f75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 17 Jul 2022 00:50:37 +0200 Subject: Use SWI-Prolog's wide-character functions. This avoids the use of TsmFromSz. --- c/pl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'c/pl.cpp') diff --git a/c/pl.cpp b/c/pl.cpp index c944547..21253ba 100644 --- a/c/pl.cpp +++ b/c/pl.cpp @@ -37,10 +37,10 @@ int Query::NextSolution() int PL_get_tchars(term_t t, TCHAR **lpTsz, int iFlags) { #ifdef UNICODE - size_t sizLen; - if (!PL_get_wchars(t, &sizLen, lpTsz, iFlags)) + size_t len; + if (!PL_get_wchars(t, &len, lpTsz, iFlags)) return 0; - return sizLen; + return len; #else if (!PL_get_chars(t, lpTsz, iFlags)) return 0; -- cgit v1.2.3