diff --git a/C/dbase.c b/C/dbase.c index 6d247690a..8491b587c 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -2619,7 +2619,7 @@ new_lu_int_key(Int key) UInt hash_key = (CELL)key % INT_KEYS_SIZE; PredEntry *p; Prop p0; - Functor fe; + Atom ae; if (INT_LU_KEYS == NULL) { init_int_lu_keys(); @@ -2630,9 +2630,9 @@ new_lu_int_key(Int key) return NULL; } } - fe = (Functor)Yap_FullLookupAtom("$integer"); + ae = Yap_FullLookupAtom("$integer"); WRITE_LOCK(fe->FRWLock); - p0 = Yap_NewPredPropByAtom(fe,IDB_MODULE); + p0 = Yap_NewPredPropByAtom(ae,IDB_MODULE); p = RepPredProp(p0); p->NextOfPE = INT_LU_KEYS[hash_key]; p->src.IndxId = key; diff --git a/C/heapgc.c b/C/heapgc.c index 5e397c318..26b0c0af0 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -3065,8 +3065,6 @@ compact_heap(void) , &depfr #endif ); - if (GcCalls==355) - fprintf(stderr,"Start=%p,%p %d\n",H-1,H0,H-H0); for (current = H - 1; current >= start_from; current--) { if (MARKED_PTR(current)) { CELL ccell = UNMARK_CELL(*current); diff --git a/C/utilpreds.c b/C/utilpreds.c index 9d02e065d..f7c95cf3d 100644 --- a/C/utilpreds.c +++ b/C/utilpreds.c @@ -212,7 +212,7 @@ copy_complex_term(CELL *pt0, CELL *pt0_end, int share, int newattvs, CELL *ptf, *ptf++ = (CELL) ptd0; } else { #if COROUTINING - if (IsAttachedTerm((CELL)ptd0)) { + if (newattvs && IsAttachedTerm((CELL)ptd0)) { /* if unbound, call the standard copy term routine */ struct cp_frame *bp[1];