Issue #10833: Use PyUnicode_FromFormat() and PyErr_Format() instead of

PyOS_snprintf().
This commit is contained in:
Victor Stinner 2011-03-21 13:26:24 +01:00
parent bfc7bf06a6
commit 499dfcf29d
6 changed files with 54 additions and 68 deletions

View file

@ -680,8 +680,8 @@ handle_weakrefs(PyGC_Head *unreachable, PyGC_Head *old)
static void
debug_cycle(char *msg, PyObject *op)
{
PySys_WriteStderr("gc: %.100s <%.100s %p>\n",
msg, Py_TYPE(op)->tp_name, op);
PySys_FormatStderr("gc: %s <%s %p>\n",
msg, Py_TYPE(op)->tp_name, op);
}
/* Handle uncollectable garbage (cycles with finalizers, and stuff reachable