mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Issue #8767: Restore building with --disable-unicode.
Original patch by Stefano Taschini.
This commit is contained in:
parent
77e77a1273
commit
ed11a5d018
14 changed files with 63 additions and 9 deletions
|
|
@ -135,6 +135,7 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
|
|||
will return a surrogate. In both the cases skip the
|
||||
optimization in order to produce compatible pycs.
|
||||
*/
|
||||
#ifdef Py_USING_UNICODE
|
||||
if (newconst != NULL &&
|
||||
PyUnicode_Check(v) && PyUnicode_Check(newconst)) {
|
||||
Py_UNICODE ch = PyUnicode_AS_UNICODE(newconst)[0];
|
||||
|
|
@ -147,6 +148,7 @@ fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case BINARY_LSHIFT:
|
||||
newconst = PyNumber_Lshift(v, w);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue