From f5cff56a1be70d2c4e5cde5fa4e5d5d92e620dda Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 14 Oct 2011 02:13:11 +0200 Subject: Issue #13088: Add shared Py_hexdigits constant to format a number into base 16 --- Python/traceback.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Python/traceback.c') diff --git a/Python/traceback.c b/Python/traceback.c index 551f9d6228..44358ed78d 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -463,12 +463,11 @@ dump_decimal(int fd, int value) static void dump_hexadecimal(int width, unsigned long value, int fd) { - const char *hexdigits = "0123456789abcdef"; int len; char buffer[sizeof(unsigned long) * 2 + 1]; len = 0; do { - buffer[len] = hexdigits[value & 15]; + buffer[len] = Py_hexdigits[value & 15]; value >>= 4; len++; } while (len < width || value); -- cgit v1.2.1