summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-12-07 23:51:53 (GMT)
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-12-07 23:51:53 (GMT)
commite7f2186f994f84e050b869559132d28d4fe26614 (patch)
tree128bfbc5965fdd44e4342fdfa5ec96ef65e31194 /Objects/bytesobject.c
parent527507d72ef2374ecd9f53f1a0a3c00783b73f4e (diff)
downloadcpython-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.c2
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);
}