From 98c849c08732e32acff7c6f1fcbfa89aba4c5276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Tue, 13 Dec 2011 12:16:42 +0000 Subject: [PATCH] should have been easy. --- C/agc.c | 9 +++++---- C/grow.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/C/agc.c b/C/agc.c index 0335dcf76..6fc457f93 100644 --- a/C/agc.c +++ b/C/agc.c @@ -331,10 +331,11 @@ mark_global_cell(CELL *pt) (((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/sizeof(CELL); Opaque_CallOnGCMark f; Opaque_CallOnGCRellocate f2; + Term t = AbsAppl(pt); - if ( (f = Yap_blob_gc_mark_handler(reg)) ) { + if ( (f = Yap_blob_gc_mark_handler(t)) ) { CELL ar[256]; - Int i,n = (f)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, 256); + Int i,n = (f)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, 256); if (n < 0) { Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"not enough space for slot internal variables in agc"); } @@ -345,8 +346,8 @@ mark_global_cell(CELL *pt) *pt = AtomTermAdjust(reg); } } - if ( (f2 = Yap_blob_gc_rellocate_handler(reg)) < 0 ) { - int out = (f2)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, n); + if ( (f2 = Yap_blob_gc_rellocate_handler(t)) < 0 ) { + int out = (f2)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, n); if (out < 0) Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"bad restore of slot internal variables in agc"); } diff --git a/C/grow.c b/C/grow.c index be6fef28a..46e0d259f 100644 --- a/C/grow.c +++ b/C/grow.c @@ -579,10 +579,11 @@ AdjustGlobal(long sz, int thread_copying USES_REGS) (((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/CellSize; Opaque_CallOnGCMark f; Opaque_CallOnGCRellocate f2; + Term t = AbsAppl(pt); - if ( (f = Yap_blob_gc_mark_handler(reg)) ) { + if ( (f = Yap_blob_gc_mark_handler(t)) ) { CELL ar[256]; - Int i,n = (f)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, 256); + Int i,n = (f)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, 256); if (n < 0) { Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"not enough space for slot internal variables"); } @@ -605,8 +606,8 @@ AdjustGlobal(long sz, int thread_copying USES_REGS) else if (IsAtomTerm(reg)) *pt = AtomTermAdjust(reg); } - if ( (f2 = Yap_blob_gc_rellocate_handler(reg)) < 0 ) { - int out = (f2)(Yap_BlobTag(reg), Yap_BlobInfo(reg), ar, n); + if ( (f2 = Yap_blob_gc_rellocate_handler(t)) < 0 ) { + int out = (f2)(Yap_BlobTag(t), Yap_BlobInfo(t), ar, n); if (out < 0) Yap_Error(OUT_OF_HEAP_ERROR,TermNil,"bad restore of slot internal variables"); }