File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -742,7 +742,13 @@ collect(int generation)
742742 generation );
743743 PySys_WriteStderr ("gc: objects in each generation:" );
744744 for (i = 0 ; i < NUM_GENERATIONS ; i ++ ) {
745- PySys_WriteStderr (" %ld" , gc_list_size (GEN_HEAD (i )));
745+ #ifdef MS_WIN64
746+ PySys_WriteStderr (" %Id" , gc_list_size (GEN_HEAD (i )));
747+ #else
748+ PySys_WriteStderr (" %ld" ,
749+ Py_SAFE_DOWNCAST (gc_list_size (GEN_HEAD (i )),
750+ Py_ssize_t , long ));
751+ #endif
746752 }
747753 PySys_WriteStderr ("\n" );
748754 }
@@ -835,9 +841,16 @@ collect(int generation)
835841 PySys_WriteStderr ("gc: done.\n" );
836842 }
837843 else {
844+ #ifdef MS_WIN64
838845 PySys_WriteStderr (
839- "gc: done, %ld unreachable, %ld uncollectable.\n" ,
846+ "gc: done, %Id unreachable, %Id uncollectable.\n" ,
840847 n + m , n );
848+ #else
849+ PySys_WriteStderr (
850+ "gc: done, %ld unreachable, %ld uncollectable.\n" ,
851+ Py_SAFE_DOWNCAST (n + m , Py_ssize_t , long ),
852+ Py_SAFE_DOWNCAST (n , Py_ssize_t , long ));
853+ #endif
841854 }
842855 }
843856
You can’t perform that action at this time.
0 commit comments