diff options
author | Tim Peters <tim@python.org> | 2013-09-06 03:57:04 (GMT) |
---|---|---|
committer | Tim Peters <tim@python.org> | 2013-09-06 03:57:04 (GMT) |
commit | eaa3bcc370cffe080e637fc1af592add9ff59793 (patch) | |
tree | d4734499127a58ba7bae2fba2486da3127e4d51b /Objects | |
parent | 31b862d40bd154afcc82acf49c746b8bbee2f6be (diff) | |
download | cpython-eaa3bcc370cffe080e637fc1af592add9ff59793.zip cpython-eaa3bcc370cffe080e637fc1af592add9ff59793.tar.gz cpython-eaa3bcc370cffe080e637fc1af592add9ff59793.tar.bz2 |
Issue #18942: sys._debugmallocstats() output was damaged on Windows.
_PyDebugAllocatorStats() called PyOS_snprintf() with a %zd format
code, but MS doesn't support that code. Interpolated
PY_FORMAT_SIZE_T in place of the "z".
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/obmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index 50fc7c1..c261b68 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -1761,7 +1761,7 @@ _PyDebugAllocatorStats(FILE *out, char buf1[128]; char buf2[128]; PyOS_snprintf(buf1, sizeof(buf1), - "%d %ss * %zd bytes each", + "%d %ss * %" PY_FORMAT_SIZE_T "d bytes each", num_blocks, block_name, sizeof_block); PyOS_snprintf(buf2, sizeof(buf2), "%48s ", buf1); |