diff options
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 10a4ed7..6c8ca38 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -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 @@ -769,7 +769,9 @@ get_time(void) { double result = 0; if (tmod != NULL) { - PyObject *f = PyObject_CallMethod(tmod, "time", NULL); + _Py_IDENTIFIER(time); + + PyObject *f = _PyObject_CallMethodId(tmod, &PyId_time, NULL); if (f == NULL) { PyErr_Clear(); } |