changeset: 100558:5f2284ecf9c6 user: Victor Stinner date: Wed Mar 16 09:43:14 2016 +0100 files: Python/traceback.c description: Fix compilation error of traceback.c on Windows Issue #26564. diff -r 811ec2860dc4 -r 5f2284ecf9c6 Python/traceback.c --- a/Python/traceback.c Thu Mar 17 07:50:22 2016 +0000 +++ b/Python/traceback.c Wed Mar 16 09:43:14 2016 +0100 @@ -509,13 +509,13 @@ 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 {