Skip to content

Commit e251d6d

Browse files
author
Victor Stinner
committed
print_exception() uses PyUnicode_GetLength() instead of PyUnicode_GetSize()
1 parent b960b34 commit e251d6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/pythonrun.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1641,7 +1641,7 @@ print_exception(PyObject *f, PyObject *value)
16411641
if (s == NULL)
16421642
err = -1;
16431643
else if (!PyUnicode_Check(s) ||
1644-
PyUnicode_GetSize(s) != 0)
1644+
PyUnicode_GetLength(s) != 0)
16451645
err = PyFile_WriteString(": ", f);
16461646
if (err == 0)
16471647
err = PyFile_WriteObject(s, f, Py_PRINT_RAW);

0 commit comments

Comments
 (0)