diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-16 09:43:14 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-16 09:43:14 +0100 |
commit | 1ebb233c2a76c6a3b1925d47bc1dd4c1116f1a2f (patch) | |
tree | 3053c08b0dea6d017e4a0b6963a564c0a5f7c6ed /Python | |
parent | 9862a761be89fe0ac8b64b42f3881bf870d6edf5 (diff) | |
download | cpython-1ebb233c2a76c6a3b1925d47bc1dd4c1116f1a2f.tar.gz |
Fix compilation error of traceback.c on Windows
Issue #26564.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/traceback.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index a40dbd101f..8383c166db 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -509,13 +509,13 @@ _Py_DumpDecimal(int fd, unsigned long value) static void dump_hexadecimal(int fd, unsigned long value, Py_ssize_t width) { - Py_ssize_t size = sizeof(unsigned long) * 2; - char buffer[size + 1], *ptr, *end; + char buffer[sizeof(unsigned long) * 2 + 1], *ptr, *end; + const Py_ssize_t size = Py_ARRAY_LENGTH(buffer) - 1; if (width > size) width = size; - end = &buffer[Py_ARRAY_LENGTH(buffer) - 1]; + end = &buffer[size]; ptr = end; *ptr = '\0'; do { |