fix reference counters when copying try-trust chains
fixes on memory allocation git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@912 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
@@ -1197,13 +1197,15 @@ Yap_absmi(int inp)
|
||||
FAIL();
|
||||
}
|
||||
}
|
||||
setregs();
|
||||
if (!Yap_IUnify(ARG2, t)) {
|
||||
setregs();
|
||||
FAIL();
|
||||
}
|
||||
if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) {
|
||||
setregs();
|
||||
FAIL();
|
||||
}
|
||||
setregs();
|
||||
|
||||
#if defined(YAPOR) || defined(THREADS)
|
||||
|
||||
@@ -1237,12 +1239,16 @@ Yap_absmi(int inp)
|
||||
{
|
||||
LogUpdClause *cl = ClauseCodeToLogUpdClause(PREG);
|
||||
|
||||
saveregs();
|
||||
if (!Yap_IUnify(ARG2, cl->ClSource->Entry)) {
|
||||
setregs();
|
||||
FAIL();
|
||||
}
|
||||
if (!Yap_IUnify(ARG3, MkDBRefTerm((DBRef)cl))) {
|
||||
setregs();
|
||||
FAIL();
|
||||
}
|
||||
setregs();
|
||||
|
||||
/* say that an environment is using this clause */
|
||||
/* we have our own copy for the clause */
|
||||
|
||||
Reference in New Issue
Block a user