summaryrefslogtreecommitdiff
path: root/Python/traceback.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/traceback.c')
-rw-r--r--Python/traceback.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index 3ec0618af9..e76c9aa1a1 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -1077,7 +1077,6 @@ _Py_DumpASCII(int fd, PyObject *text)
int truncated;
int kind;
void *data = NULL;
- wchar_t *wstr = NULL;
Py_UCS4 ch;
if (!PyUnicode_Check(text))
@@ -1085,13 +1084,7 @@ _Py_DumpASCII(int fd, PyObject *text)
size = ascii->length;
kind = ascii->state.kind;
- if (kind == PyUnicode_WCHAR_KIND) {
- wstr = ascii->wstr;
- if (wstr == NULL)
- return;
- size = _PyCompactUnicodeObject_CAST(text)->wstr_length;
- }
- else if (ascii->state.compact) {
+ if (ascii->state.compact) {
if (ascii->state.ascii)
data = ascii + 1;
else
@@ -1132,10 +1125,7 @@ _Py_DumpASCII(int fd, PyObject *text)
}
for (i=0; i < size; i++) {
- if (kind != PyUnicode_WCHAR_KIND)
- ch = PyUnicode_READ(kind, data, i);
- else
- ch = wstr[i];
+ ch = PyUnicode_READ(kind, data, i);
if (' ' <= ch && ch <= 126) {
/* printable ASCII character */
char c = (char)ch;