From c64d22311da31375ffcc4b1ac6199cf4a993db0d Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Thu, 21 Jun 2012 16:47:19 +0100 Subject: [PATCH] call UDI at abolish. --- C/cdmgr.c | 3 +++ C/udi.c | 7 +++++++ H/Yapproto.h | 1 + 3 files changed, 11 insertions(+) diff --git a/C/cdmgr.c b/C/cdmgr.c index 3c819c55b..78b0827a5 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -2633,6 +2633,9 @@ p_endconsult( USES_REGS1 ) static void purge_clauses(PredEntry *pred) { + if (pred->PredFlags & UDIPredFlag) { + Yap_udi_abolish(pred); + } if (pred->cs.p_code.NOfClauses) { if (pred->PredFlags & IndexedPredFlag) RemoveIndexation(pred); diff --git a/C/udi.c b/C/udi.c index 5606c1ae3..7091df6d4 100644 --- a/C/udi.c +++ b/C/udi.c @@ -148,6 +148,13 @@ Yap_udi_search(PredEntry *p) return info->functions->search(info->cb); } +/* index, called from absmi.c */ +void +Yap_udi_abolish(PredEntry *p) +{ + /* tell the predicate destroy */ +} + void Yap_udi_init(void) { diff --git a/H/Yapproto.h b/H/Yapproto.h index 3b2c6981e..0d23006ed 100644 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -377,6 +377,7 @@ void STD_PROTO(Yap_InitLowLevelTrace,(void)); /* udi.c */ void STD_PROTO(Yap_udi_init,(void)); +void STD_PROTO(Yap_udi_abolish,(struct pred_entry *)); /* unify.c */ int STD_PROTO(Yap_rational_tree_loop, (CELL *, CELL *, CELL **, CELL **));