summaryrefslogtreecommitdiff
path: root/Python/traceback.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 551f9d6228..2f4653bce6 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -152,7 +152,7 @@ _Py_FindSourceFile(PyObject *filename, char* namebuf, size_t namelen, PyObject *
const char* filepath;
Py_ssize_t len;
PyObject* result;
- _Py_identifier(open);
+ _Py_IDENTIFIER(open);
filebytes = PyUnicode_EncodeFSDefault(filename);
if (filebytes == NULL) {
@@ -232,9 +232,9 @@ _Py_DisplaySourceLine(PyObject *f, PyObject *filename, int lineno, int indent)
char buf[MAXPATHLEN+1];
int kind;
void *data;
- _Py_identifier(close);
- _Py_identifier(open);
- _Py_identifier(TextIOWrapper);
+ _Py_IDENTIFIER(close);
+ _Py_IDENTIFIER(open);
+ _Py_IDENTIFIER(TextIOWrapper);
/* open the file */
if (filename == NULL)
@@ -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);