]> granicus.if.org Git - python/commitdiff
_Py_NegativeRefcount(): print the full value of ob_refcnt.
authorTim Peters <tim.peters@gmail.com>
Thu, 23 Mar 2006 05:38:33 +0000 (05:38 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 23 Mar 2006 05:38:33 +0000 (05:38 +0000)
Objects/object.c

index 9b6a30a4f9799040a8a88ccff574d057ac405c3c..e598b69995993c45578084a7da0c138b4394feb5 100644 (file)
@@ -138,10 +138,9 @@ _Py_NegativeRefcount(const char *fname, int lineno, PyObject *op)
 {
        char buf[300];
 
-       /* XXX(twouters) cast refcount to long until %zd is universally
-          available */
        PyOS_snprintf(buf, sizeof(buf),
-                     "%s:%i object at %p has negative ref count %ld",
+                     "%s:%i object at %p has negative ref count "
+                     "%" PY_FORMAT_SIZE_T "d",
                      fname, lineno, op, (long)op->ob_refcnt);
        Py_FatalError(buf);
 }