assert logupd should set the clause in use (obs by Jose Santos).
This commit is contained in:
parent
068242a833
commit
dccf3cf8a2
12
C/cdmgr.c
12
C/cdmgr.c
@ -2238,7 +2238,17 @@ addclause(Term t, yamop *cp, int mode, Term mod, Term *t4ref)
|
|||||||
}
|
}
|
||||||
UNLOCK(p->PELock);
|
UNLOCK(p->PELock);
|
||||||
if (pflags & LogUpdatePredFlag) {
|
if (pflags & LogUpdatePredFlag) {
|
||||||
tf = MkDBRefTerm((DBRef)ClauseCodeToLogUpdClause(cp));
|
LogUpdClause *cl = (DBRef)ClauseCodeToLogUpdClause(cp);
|
||||||
|
tf = MkDBRefTerm((DBRef)cl);
|
||||||
|
#if defined(YAPOR) || defined(THREADS)
|
||||||
|
TRAIL_CLREF(cl); /* So that fail will erase it */
|
||||||
|
INC_CLREF_COUNT(cl);
|
||||||
|
#else
|
||||||
|
if (!(cl->ClFlags & InUseMask)) {
|
||||||
|
cl->ClFlags |= InUseMask;
|
||||||
|
TRAIL_CLREF(cl); /* So that fail will erase it */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
tf = Yap_MkStaticRefTerm(ClauseCodeToStaticClause(cp));
|
tf = Yap_MkStaticRefTerm(ClauseCodeToStaticClause(cp));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user