support new interface between YAP and GMP, so that we don't rely on our own
allocation routines. Several big fixes. git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1490 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
16
C/attvar.c
16
C/attvar.c
@@ -274,8 +274,22 @@ ReplaceAtts(attvar_record *attv, Term oatt, Term att)
|
||||
{
|
||||
UInt ar = ArityOfFunctor(FunctorOfTerm(oatt)), i;
|
||||
CELL *oldp = RepAppl(oatt)+1;
|
||||
CELL *newp = RepAppl(att)+1;
|
||||
CELL *newp;
|
||||
|
||||
if (oldp > HB) {
|
||||
oldp++;
|
||||
newp = RepAppl(att)+2;
|
||||
/* if deterministic */
|
||||
for (i=1; i< ar; i++) {
|
||||
if (*newp != TermFoundVar) {
|
||||
*oldp = *newp;
|
||||
}
|
||||
oldp++;
|
||||
newp++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
newp = RepAppl(att)+1;
|
||||
*newp++ = *oldp++;
|
||||
for (i=1; i< ar; i++) {
|
||||
if (*newp == TermFoundVar) {
|
||||
|
Reference in New Issue
Block a user