diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-12-07 23:51:53 (GMT) |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-12-07 23:51:53 (GMT) |
commit | e7f2186f994f84e050b869559132d28d4fe26614 (patch) | |
tree | 128bfbc5965fdd44e4342fdfa5ec96ef65e31194 /Objects/bytesobject.c | |
parent | 527507d72ef2374ecd9f53f1a0a3c00783b73f4e (diff) | |
download | cpython-e7f2186f994f84e050b869559132d28d4fe26614.zip cpython-e7f2186f994f84e050b869559132d28d4fe26614.tar.gz cpython-e7f2186f994f84e050b869559132d28d4fe26614.tar.bz2 |
Issue #16495: remove extraneous NULL encoding check from bytes_decode().
The NULL encoding check in bytes_decode() was unnecessary because this case
is already taken care of by the call to _Py_normalize_encoding() inside
PyUnicode_Decode().
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r-- | Objects/bytesobject.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c index a1db778..8d8cb05 100644 --- a/Objects/bytesobject.c +++ b/Objects/bytesobject.c @@ -2236,8 +2236,6 @@ bytes_decode(PyObject *self, PyObject *args, PyObject *kwargs) if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ss:decode", kwlist, &encoding, &errors)) return NULL; - if (encoding == NULL) - encoding = PyUnicode_GetDefaultEncoding(); return PyUnicode_FromEncodedObject(self, encoding, errors); } |