fix PL_cut_query to remove top CP, and fix PL_call_predicate to use PL_cut_query to close,

and not PL_close_query.
This commit is contained in:
Vítor Santos Costa II 2010-04-23 16:43:29 +01:00
parent 0e0973de42
commit 8d04b08b95

View File

@ -2128,6 +2128,7 @@ X_API void PL_cut_query(qid_t qi)
{
if (qi->open != 1) return;
YAP_PruneGoal();
YAP_cut_up();
qi->open = 0;
}
@ -2145,7 +2146,7 @@ X_API int PL_call_predicate(module_t ctx, int flags, predicate_t p, term_t t0)
{
qid_t qi = PL_open_query(ctx, flags, p, t0);
int ret = PL_next_solution(qi);
PL_close_query(qi);
PL_cut_query(qi);
return ret;
}