diff Python/traceback.c @ 72918:d76338eacf7c

Issue #13088: Add shared Py_hexdigits constant to format a number into base 16
author Victor Stinner <victor.stinner@haypocalc.com>
date Fri, 14 Oct 2011 02:13:11 +0200
parents 5e33219492bc
children 7109f31300fb
line wrap: on
line diff
--- a/Python/traceback.c	Fri Oct 14 00:08:29 2011 +0200
+++ b/Python/traceback.c	Fri Oct 14 02:13:11 2011 +0200
@@ -463,12 +463,11 @@
 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);