Use %ld and casts to long for refcount printing, in absense of a universally

available %zd format character. Mark with an XXX comment so we can fix this,
later.
This commit is contained in:
Thomas Wouters 2006-03-01 05:41:20 +00:00
parent 572a9f32dc
commit 8b87a0b5fc
3 changed files with 31 additions and 12 deletions

View file

@ -1220,9 +1220,14 @@ PyInt_Fini(void)
i < N_INTOBJECTS;
i++, p++) {
if (PyInt_CheckExact(p) && p->ob_refcnt != 0)
/* XXX(twouters) cast refcount to
long until %zd is universally
available
*/
fprintf(stderr,
"# <int at %p, refcnt=%d, val=%ld>\n",
p, p->ob_refcnt, p->ob_ival);
"# <int at %p, refcnt=%ld, val=%ld>\n",
p, (long)p->ob_refcnt,
p->ob_ival);
}
list = list->next;
}