diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-16 08:43:14 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-16 08:43:14 (GMT) |
commit | 013024ef67b7e5989e4be03f4ff2be22aa753ae0 (patch) | |
tree | 67730f1a68ce6eebec42e19a3c531a1c60709294 /Python/traceback.c | |
parent | 32f2eb4941db115d4d5d0902ba086820406ef4b2 (diff) | |
download | cpython-013024ef67b7e5989e4be03f4ff2be22aa753ae0.zip cpython-013024ef67b7e5989e4be03f4ff2be22aa753ae0.tar.gz cpython-013024ef67b7e5989e4be03f4ff2be22aa753ae0.tar.bz2 |
Fix compilation error of traceback.c on Windows
Issue #26564.
Diffstat (limited to 'Python/traceback.c')
-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 a40dbd1..8383c16 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 { |