diff Objects/floatobject.c @ 36759:83b860acfe95 legacy-trunk

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.
author Thomas Wouters <thomas@python.org>
date Wed, 01 Mar 2006 05:41:20 +0000
parents dba6494735d0
children 4bfe8afe8f65 79a0f080f898
line wrap: on
line diff
--- a/Objects/floatobject.c	Wed Mar 01 05:38:39 2006 +0000
+++ b/Objects/floatobject.c	Wed Mar 01 05:41:20 2006 +0000
@@ -1326,9 +1326,13 @@
 				    p->ob_refcnt != 0) {
 					char buf[100];
 					PyFloat_AsString(buf, p);
+					/* XXX(twouters) cast refcount to
+					   long until %zd is universally
+					   available
+					 */
 					fprintf(stderr,
-			     "#   <float at %p, refcnt=%d, val=%s>\n",
-						p, p->ob_refcnt, buf);
+			     "#   <float at %p, refcnt=%ld, val=%s>\n",
+						p, (long)p->ob_refcnt, buf);
 				}
 			}
 			list = list->next;