diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-14 02:13:11 +0200 |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-14 02:13:11 +0200 |
commit | da328a42858356139f9e6de860b802408ed76f5d (patch) | |
tree | adbb203db90912487281f97f5b0461557aba9bc5 /Python/traceback.c | |
parent | 055fcd534b46fc2dcb4ebb644d436fd9629d157c (diff) | |
download | cpython-da328a42858356139f9e6de860b802408ed76f5d.tar.gz |
Issue #13088: Add shared Py_hexdigits constant to format a number into base 16
Diffstat (limited to 'Python/traceback.c')
-rw-r--r-- | Python/traceback.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |