diff options
Diffstat (limited to 'c/pl.cpp')
-rw-r--r-- | c/pl.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
@@ -77,21 +77,11 @@ int Query::NextSolution() return 0; } -/* Convert Prolog term to normal or wide characters. */ -template <> -int PlString<char>(const term_t t, std::string* const pStr, const int iFlags) +/* Convert Prolog term to wide characters. */ +int PlString(const term_t t, std::wstring* const pWstr, const int iFlags) { char* sz; int r = PL_get_chars(t, &sz, iFlags); - if (r) *pStr = sz; - return r; -} - -template <> -int PlString<wchar_t>(const term_t t, std::wstring* const pWstr, const int iFlags) -{ - char* sz; - int r = PL_get_chars(t, &sz, iFlags); - if (r) *pWstr = BstrFromSz<wchar_t>(sz); + if (r) *pWstr = WstrFromSz(sz); return r; } |