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".
This commit is contained in:
Tim Peters 2013-09-05 22:57:04 -05:00
parent 31b862d40b
commit eaa3bcc370
2 changed files with 3 additions and 1 deletions

View file

@ -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);