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:
vsc
2003-10-30 22:52:46 +00:00
parent 4f97e338ab
commit 009452e075
4 changed files with 30 additions and 5 deletions

View File

@@ -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 */