mirror of
https://github.com/python/cpython.git
synced 2025-09-18 22:50:26 +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
|
@ -1578,6 +1578,7 @@ builtin_print(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
Py_CLEAR(str_newline);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef Py_USING_UNICODE
|
||||
unicode_newline = PyUnicode_FromString("\n");
|
||||
if (unicode_newline == NULL) {
|
||||
Py_CLEAR(str_newline);
|
||||
|
@ -1591,6 +1592,7 @@ builtin_print(PyObject *self, PyObject *args, PyObject *kwds)
|
|||
Py_CLEAR(unicode_space);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (!PyArg_ParseTupleAndKeywords(dummy_args, kwds, "|OOO:print",
|
||||
kwlist, &sep, &end, &file))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue