summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-03-28 21:44:32 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-03-28 21:44:32 (GMT)
commit62e97f023bf0c02f5f3c1a1552e8136c0b5c4cff (patch)
tree0c71da41d08f4e8c9922a049357b5cd76ee1ecbc /Python
parentefb6e752cfd4e5ea64bdfcdd3fb68d5951c13218 (diff)
downloadcpython-62e97f023bf0c02f5f3c1a1552e8136c0b5c4cff.zip
cpython-62e97f023bf0c02f5f3c1a1552e8136c0b5c4cff.tar.gz
cpython-62e97f023bf0c02f5f3c1a1552e8136c0b5c4cff.tar.bz2
In format strings slinging Py_ssize_t, unconditionally
interpolate PY_FORMAT_SIZE_T instead of #if'ing on MS_WIN64.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index cd22942..4c8c517 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -30,14 +30,11 @@
#endif
#ifndef Py_REF_DEBUG
-# define PRINT_TOTAL_REFS()
+#define PRINT_TOTAL_REFS()
#else /* Py_REF_DEBUG */
-# if defined(MS_WIN64)
-# define PRINT_TOTAL_REFS() fprintf(stderr, "[%Id refs]\n", _Py_RefTotal);
-# else /* ! MS_WIN64 */
-# define PRINT_TOTAL_REFS() fprintf(stderr, "[%ld refs]\n", \
- Py_SAFE_DOWNCAST(_Py_RefTotal, Py_ssize_t, long));
-# endif /* MS_WIN64 */
+#define PRINT_TOTAL_REFS() fprintf(stderr, \
+ "[%" PY_FORMAT_SIZE_T "d refs]\n", \
+ _Py_RefTotal)
#endif
extern char *Py_GetPath(void);
@@ -393,7 +390,7 @@ Py_Finalize(void)
dump_counts();
#endif
- PRINT_TOTAL_REFS()
+ PRINT_TOTAL_REFS();
#ifdef Py_TRACE_REFS
/* Display all objects still alive -- this can invoke arbitrary
@@ -683,7 +680,7 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename, PyCompilerFlags *flag
}
for (;;) {
ret = PyRun_InteractiveOneFlags(fp, filename, flags);
- PRINT_TOTAL_REFS()
+ PRINT_TOTAL_REFS();
if (ret == E_EOF)
return 0;
/*