aboutsummaryrefslogtreecommitdiff
path: root/c/pl.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/pl.h')
-rw-r--r--c/pl.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/c/pl.h b/c/pl.h
index c7fcfc8..0a65c96 100644
--- a/c/pl.h
+++ b/c/pl.h
@@ -7,7 +7,7 @@
#include "common.h"
-wstring_owner PlString(const term_t t, const int iFlags = CVT_WRITE);
+wstring_owner PlString(const term_t t, const int flags = CVT_WRITE);
struct Frame
{
@@ -69,9 +69,9 @@ inline int PlGet(term_t t, atom_t* x) { return PL_get_atom(t, x); }
inline int PlGet(term_t t, char** x) { return PL_get_atom_chars(t, x); }
inline int PlGet(term_t t, wstring_owner* x) {
Mark m;
- char* sz;
- if (!PlGet(t, &sz)) return 0;
- *x = WsoFromSz(sz);
+ char* s;
+ if (!PlGet(t, &s)) return 0;
+ *x = WsoFromSz(s);
return 1; /* or catch potential exception from BstrFromSz? */
}
@@ -89,13 +89,13 @@ inline bool PlGetN(term_t t, T x, U... xs) { return PlGet(t, x) && PlGetN(t+1, x
/* Call Prolog predicate. */
template <bool Except = false, typename... T>
-int Pl(const char* const szMod, const char* const szPred, T... xs)
+int Pl(const char* const mod, const char* const pred, T... xs)
{
Frame f;
const term_t t = PL_new_term_refs(sizeof...(T));
if (!PlPutN(t, xs...)) return 0;
- Query q(NULL, PL_predicate(szPred, sizeof...(T), szMod), t);
+ Query q(NULL, PL_predicate(pred, sizeof...(T), mod), t);
if constexpr (Except) {
if (!q.NextSolution()) return 0;
@@ -109,9 +109,9 @@ int Pl(const char* const szMod, const char* const szPred, T... xs)
/* Call Prolog predicate, propagating Prolog exceptions. */
template <typename... T>
-int Plx(const char* const szMod, const char* const szPred, T... xs)
+int Plx(const char* const mod, const char* const pred, T... xs)
{
- return Pl<true>(szMod, szPred, xs...);
+ return Pl<true>(mod, pred, xs...);
}
#endif