mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Patch #494384: Disable more Unicode API if Unicode is not used.
This commit is contained in:
parent
a255a72f0a
commit
8d3ce5a6b3
1 changed files with 2 additions and 0 deletions
|
@ -1362,6 +1362,7 @@ eval_frame(PyFrameObject *f)
|
||||||
s[len-1] != ' ')
|
s[len-1] != ' ')
|
||||||
PyFile_SoftSpace(w, 0);
|
PyFile_SoftSpace(w, 0);
|
||||||
}
|
}
|
||||||
|
#ifdef Py_USING_UNICODE
|
||||||
else if (PyUnicode_Check(v)) {
|
else if (PyUnicode_Check(v)) {
|
||||||
Py_UNICODE *s = PyUnicode_AS_UNICODE(v);
|
Py_UNICODE *s = PyUnicode_AS_UNICODE(v);
|
||||||
int len = PyUnicode_GET_SIZE(v);
|
int len = PyUnicode_GET_SIZE(v);
|
||||||
|
@ -1370,6 +1371,7 @@ eval_frame(PyFrameObject *f)
|
||||||
s[len-1] != ' ')
|
s[len-1] != ' ')
|
||||||
PyFile_SoftSpace(w, 0);
|
PyFile_SoftSpace(w, 0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
Py_DECREF(v);
|
Py_DECREF(v);
|
||||||
Py_XDECREF(stream);
|
Py_XDECREF(stream);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue