Skip to content

Commit afdeb18

Browse files
sir-sigurdgpshead
authored andcommitted
Remove unneeded assignment in PyBytes_Concat() (GH-15274)
The `wb.len = -1` assignment is unneeded since its introduction in 161d695 as `PyObject_GetBuffer` always fills it in.
1 parent 9cbb97b commit afdeb18

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Objects/bytesobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,6 @@ PyBytes_Concat(PyObject **pv, PyObject *w)
29352935
Py_ssize_t oldsize;
29362936
Py_buffer wb;
29372937

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

0 commit comments

Comments
 (0)