diff options
Diffstat (limited to 'Modules/gcmodule.c')
-rw-r--r-- | Modules/gcmodule.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 444092e..a3655d6 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -742,7 +742,13 @@ collect(int generation) generation); PySys_WriteStderr("gc: objects in each generation:"); for (i = 0; i < NUM_GENERATIONS; i++) { - PySys_WriteStderr(" %ld", gc_list_size(GEN_HEAD(i))); +#ifdef MS_WIN64 + PySys_WriteStderr(" %Id", gc_list_size(GEN_HEAD(i))); +#else + PySys_WriteStderr(" %ld", + Py_SAFE_DOWNCAST(gc_list_size(GEN_HEAD(i)), + Py_ssize_t, long)); +#endif } PySys_WriteStderr("\n"); } @@ -835,9 +841,16 @@ collect(int generation) PySys_WriteStderr("gc: done.\n"); } else { +#ifdef MS_WIN64 PySys_WriteStderr( - "gc: done, %ld unreachable, %ld uncollectable.\n", + "gc: done, %Id unreachable, %Id uncollectable.\n", n+m, n); +#else + PySys_WriteStderr( + "gc: done, %ld unreachable, %ld uncollectable.\n", + Py_SAFE_DOWNCAST(n+m, Py_ssize_t, long), + Py_SAFE_DOWNCAST(n, Py_ssize_t, long)); +#endif } } |