bpo-29803: remove a redandunt op and fix a comment in unicodeobject.c… · python/cpython@2b77a92 (original) (raw)

Original file line number Diff line number Diff line change
@@ -3727,10 +3727,6 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
3727 3727 }
3728 3728
3729 3729 if (PyUnicode_Check(path)) {
3730 -if (PyUnicode_READY(path) == -1) {
3731 -Py_DECREF(path);
3732 -return 0;
3733 - }
3734 3730 output = path;
3735 3731 }
3736 3732 else if (PyBytes_Check(path) |
@@ -6426,7 +6422,7 @@ PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
6426 6422 if (ch < 0x100) {
6427 6423 *p++ = (char) ch;
6428 6424 }
6429 -/* U+0000-U+00ff range: Map 16-bit characters to '\uHHHH' */
6425 +/* U+0100-U+ffff range: Map 16-bit characters to '\uHHHH' */
6430 6426 else if (ch < 0x10000) {
6431 6427 *p++ = '\\';
6432 6428 *p++ = 'u';