if you try to reconsult over active clauses, kill the preexisting ones
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@383 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
fb8624f5ac
commit
c15ce56e12
@ -754,6 +754,7 @@ not_was_reconsulted(PredEntry *p, Term t, int mode)
|
|||||||
Int Arity = p->ArityOfPE;
|
Int Arity = p->ArityOfPE;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
if(0)
|
||||||
list_all_predicates_in_use();
|
list_all_predicates_in_use();
|
||||||
#endif
|
#endif
|
||||||
ErrorMessage = ErrorSay;
|
ErrorMessage = ErrorSay;
|
||||||
@ -864,6 +865,8 @@ addclause(Term t, CODEADDR cp, int mode, int mod)
|
|||||||
spy_flag = TRUE;
|
spy_flag = TRUE;
|
||||||
if (mode == consult)
|
if (mode == consult)
|
||||||
not_was_reconsulted(p, t, TRUE);
|
not_was_reconsulted(p, t, TRUE);
|
||||||
|
if (Error_TYPE == PERMISSION_ERROR_MODIFY_STATIC_PROCEDURE)
|
||||||
|
return;
|
||||||
if (!is_dynamic(p)) {
|
if (!is_dynamic(p)) {
|
||||||
Clause *clp = ClauseCodeToClause(cp);
|
Clause *clp = ClauseCodeToClause(cp);
|
||||||
clp->ClFlags |= StaticMask;
|
clp->ClFlags |= StaticMask;
|
||||||
|
Reference in New Issue
Block a user