Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d3ce5a

Browse files
committed
Patch #494384: Disable more Unicode API if Unicode is not used.
1 parent a255a72 commit 8d3ce5a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Python/ceval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,7 @@ eval_frame(PyFrameObject *f)
13621362
s[len-1] != ' ')
13631363
PyFile_SoftSpace(w, 0);
13641364
}
1365+
#ifdef Py_USING_UNICODE
13651366
else if (PyUnicode_Check(v)) {
13661367
Py_UNICODE *s = PyUnicode_AS_UNICODE(v);
13671368
int len = PyUnicode_GET_SIZE(v);
@@ -1370,6 +1371,7 @@ eval_frame(PyFrameObject *f)
13701371
s[len-1] != ' ')
13711372
PyFile_SoftSpace(w, 0);
13721373
}
1374+
#endif
13731375
}
13741376
Py_DECREF(v);
13751377
Py_XDECREF(stream);

0 commit comments

Comments
 (0)