From 2f3d762f8053d17afbf9d6a01ac19ab58d07da31 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Mon, 1 Nov 2010 21:28:18 +0000 Subject: [PATCH] display reference count in DBRef. --- C/write.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C/write.c b/C/write.c index cabb21864..02da56d9b 100755 --- a/C/write.c +++ b/C/write.c @@ -24,6 +24,7 @@ static char SccsId[] = "%W% %G%"; #include "Yatom.h" #include "YapHeap.h" #include "yapio.h" +#include "clause.h" #if COROUTINING #include "attvar.h" #endif @@ -264,9 +265,9 @@ wrputref(CODEADDR ref, int Quote_illegal, wrf writewch) /* writes a data base putAtom(AtomDBref, Quote_illegal, writewch); #if defined(__linux__) || defined(__APPLE__) - sprintf(s, "(%p,0)", ref); + sprintf(s, "(%p," UInt_FORMAT ")", ref, ((LogUpdClause*)ref)->ClRefCount); #else - sprintf(s, "(0x%p,0)", ref); + sprintf(s, "(0x%p," UInt_FORMAT ")", ref, ((LogUpdClause*)ref)->ClRefCount); #endif wrputs(s, writewch); lastw = alphanum;