diff options
author | John Ankarström <john@ankarstrom.se> | 2022-07-20 01:49:36 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-07-20 01:49:36 +0200 |
commit | 4da9280a307ced3fab399d655b9d11330fc33bc4 (patch) | |
tree | bd13c3543ce47c47ffb49b271c51e413b742ba24 /c/pl.cpp | |
parent | b102ae6d6ea778f28d4213b5b886dcb51a9b0fd9 (diff) | |
download | EpisodeBrowser-4da9280a307ced3fab399d655b9d11330fc33bc4.tar.gz |
Simplify templates.
Diffstat (limited to 'c/pl.cpp')
-rw-r--r-- | c/pl.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -91,22 +91,3 @@ int PL_get_tchars(const term_t t, TCHAR** const pTsz, const int iFlags) return -1; #endif } - -/* Call nullary Prolog predicate, propagating Prolog exceptions. */ -int Plx(const char* const szMod, const char* const szPred) -{ - Frame f; - const term_t t = PL_new_term_refs(0); - Query q(NULL, PL_predicate(szPred, 0, szMod), t); - return q.NextSolution(); -} - -/* Call nullary Prolog predicate, ignoring Prolog exceptions. */ -int Pl(const char* const szMod, const char* const szPred) -{ - try { - return Plx(szMod, szPred); - } catch (term_t& t) { - return 0; - } -} |