Skip to content

Commit

Permalink
Remove unneeded assignment in PyBytes_Concat() (GH-15274)
Browse files Browse the repository at this point in the history
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
(cherry picked from commit afdeb18)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
  • Loading branch information
miss-islington and sir-sigurd committed Sep 10, 2019
1 parent 63909cd commit 98224d2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion Objects/bytesobject.c
Expand Up @@ -2939,7 +2939,6 @@ PyBytes_Concat(PyObject **pv, PyObject *w)
Py_ssize_t oldsize;
Py_buffer wb;

wb.len = -1;
if (PyObject_GetBuffer(w, &wb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
Py_TYPE(w)->tp_name, Py_TYPE(*pv)->tp_name);
Expand Down

0 comments on commit 98224d2

Please sign in to comment.