Commit e22373d6 authored by Neal Norwitz's avatar Neal Norwitz

Fix warnings on x86 (32-bit) and support Win64.

parent f2e0c454
......@@ -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
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment