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

Skip to content

Commit 2b77a92

Browse files
authored
bpo-29803: remove a redandunt op and fix a comment in unicodeobject.c (#660)
1 parent d019bc8 commit 2b77a92

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

Objects/unicodeobject.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3727,10 +3727,6 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
37273727
}
37283728

37293729
if (PyUnicode_Check(path)) {
3730-
if (PyUnicode_READY(path) == -1) {
3731-
Py_DECREF(path);
3732-
return 0;
3733-
}
37343730
output = path;
37353731
}
37363732
else if (PyBytes_Check(path) || is_buffer) {
@@ -6426,7 +6422,7 @@ PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
64266422
if (ch < 0x100) {
64276423
*p++ = (char) ch;
64286424
}
6429-
/* U+0000-U+00ff range: Map 16-bit characters to '\uHHHH' */
6425+
/* U+0100-U+ffff range: Map 16-bit characters to '\uHHHH' */
64306426
else if (ch < 0x10000) {
64316427
*p++ = '\\';
64326428
*p++ = 'u';

0 commit comments

Comments
 (0)