projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cbb97b
)
Remove unneeded assignment in PyBytes_Concat() (GH-15274)
author
Sergey Fedoseev
<fedoseev.sergey@gmail.com>
Tue, 10 Sep 2019 16:11:10 +0000
(21:11 +0500)
committer
Gregory P. Smith
<greg@krypto.org>
Tue, 10 Sep 2019 16:11:10 +0000
(17:11 +0100)
The `wb.len = -1` assignment is unneeded since its introduction in
161d695fb0455ce52530d4f43a9eac4c738f64bb
as `PyObject_GetBuffer` always fills it in.
Objects/bytesobject.c
patch
|
blob
|
history
diff --git
a/Objects/bytesobject.c
b/Objects/bytesobject.c
index 72f9cd271be052ed1655bb0a6b29f1d33bfaf2ff..e1f5ee2f62f336e595604ddddb6c644d0a66dd24 100644
(file)
--- a/
Objects/bytesobject.c
+++ b/
Objects/bytesobject.c
@@
-2935,7
+2935,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);