diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-26 19:27:35 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-26 19:27:35 +0200 |
commit | 547cbe578dcdb5aa5cfdac1cdb327f92bad21219 (patch) | |
tree | dc41dc107559a3ac2c87669b3616d8a33d221180 /c/pl.cpp | |
parent | dccea47e9bc322d654902a1db4fc52cbf6dd0cd7 (diff) | |
download | EpisodeBrowser-547cbe578dcdb5aa5cfdac1cdb327f92bad21219.tar.gz |
Remove ANSI compatibility.
Even though it is a fun challange in many ways, I think that,
realistically, it is probably not worth the complexity. The
Prolog backend isn't ANSI-compatible either.
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; } |