Commit a0f30527 authored by Tim Peters's avatar Tim Peters

_Py_NegativeRefcount(): print the full value of ob_refcnt.

parent 2a74e0ea
...@@ -138,10 +138,9 @@ _Py_NegativeRefcount(const char *fname, int lineno, PyObject *op) ...@@ -138,10 +138,9 @@ _Py_NegativeRefcount(const char *fname, int lineno, PyObject *op)
{ {
char buf[300]; char buf[300];
/* XXX(twouters) cast refcount to long until %zd is universally
available */
PyOS_snprintf(buf, sizeof(buf), 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); fname, lineno, op, (long)op->ob_refcnt);
Py_FatalError(buf); Py_FatalError(buf);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment