summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorXiang Zhang <angwerzx@126.com>2018-02-13 10:33:32 (GMT)
committerGitHub <noreply@github.com>2018-02-13 10:33:32 (GMT)
commit2b77a921e6a4dee236047ac8d69cf9f915916fdc (patch)
tree87cbc41f86179239292f428db45e495869e69e9c /Objects
parentd019bc8319ea35e93bf4baa38098ff1b57cd3ee5 (diff)
downloadcpython-2b77a921e6a4dee236047ac8d69cf9f915916fdc.zip
cpython-2b77a921e6a4dee236047ac8d69cf9f915916fdc.tar.gz
cpython-2b77a921e6a4dee236047ac8d69cf9f915916fdc.tar.bz2
bpo-29803: remove a redandunt op and fix a comment in unicodeobject.c (#660)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 0233438..1ae2f5e 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -3727,10 +3727,6 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
}
if (PyUnicode_Check(path)) {
- if (PyUnicode_READY(path) == -1) {
- Py_DECREF(path);
- return 0;
- }
output = path;
}
else if (PyBytes_Check(path) || is_buffer) {
@@ -6426,7 +6422,7 @@ PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
if (ch < 0x100) {
*p++ = (char) ch;
}
- /* U+0000-U+00ff range: Map 16-bit characters to '\uHHHH' */
+ /* U+0100-U+ffff range: Map 16-bit characters to '\uHHHH' */
else if (ch < 0x10000) {
*p++ = '\\';
*p++ = 'u';