summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-06 23:31:56 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-06 23:31:56 (GMT)
commite22373d69011e719aa92837822e9a35157e20e8c (patch)
tree155294bbb988f21e0c317cf0d0732fc33c6d1584 /Modules
parentf2e0c454926365086ce8965195e9f27819abb83e (diff)
downloadcpython-e22373d69011e719aa92837822e9a35157e20e8c.zip
cpython-e22373d69011e719aa92837822e9a35157e20e8c.tar.gz
cpython-e22373d69011e719aa92837822e9a35157e20e8c.tar.bz2
Fix warnings on x86 (32-bit) and support Win64.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/gcmodule.c17
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
}
}