[Python-checkins] cpython (merge 3.3 -> default): Nerge 3.3 into default.

tim.peters python-checkins at python.org
Fri Sep 6 06:11:28 CEST 2013


http://hg.python.org/cpython/rev/43f772554872
changeset:   85556:43f772554872
parent:      85554:c5924523747e
parent:      85555:d95cc29ea94e
user:        Tim Peters <tim at python.org>
date:        Thu Sep 05 23:04:26 2013 -0500
summary:
  Nerge 3.3 into default.

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".

files:
  Misc/NEWS          |  2 ++
  Objects/obmalloc.c |  2 +-
  2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -10,6 +10,8 @@
 Core and Builtins
 -----------------
 
+- Issue #18942: sys._debugmallocstats() output was damaged on Windows.
+
 - Issue #18571: Implementation of the PEP 446: file descriptors and file
   handles are now created non-inheritable; add functions
   os.get/set_inheritable(), os.get/set_handle_inheritable() and
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -2035,7 +2035,7 @@
     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);

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list