[Python-checkins] bpo-37990: fix gc stats (GH-15626)

Inada Naoki webhook-mailer at python.org
Fri Aug 30 20:13:46 EDT 2019


https://github.com/python/cpython/commit/013e52fd340d9ef558013b546f25456f94ee1804
commit: 013e52fd340d9ef558013b546f25456f94ee1804
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-08-31T09:13:42+09:00
summary:

bpo-37990: fix gc stats (GH-15626)

files:
M Modules/gcmodule.c

diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 7586cd3e0515..134f6d168c96 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -1115,8 +1115,9 @@ collect(struct _gc_runtime_state *state, int generation,
     }
     if (state->debug & DEBUG_STATS) {
         double d = _PyTime_AsSecondsDouble(_PyTime_GetMonotonicClock() - t1);
-        PySys_FormatStderr(
-            "gc: done, %zd unreachable, %zd uncollectable, %.4fs elapsed\n",
+        PySys_WriteStderr(
+            "gc: done, %" PY_FORMAT_SIZE_T "d unreachable, "
+            "%" PY_FORMAT_SIZE_T "d uncollectable, %.4fs elapsed\n",
             n+m, n, d);
     }
 



More information about the Python-checkins mailing list