mirror of
https://github.com/python/cpython.git
synced 2025-08-23 18:24:46 +00:00
bpo-47012: speed up iteration of bytes and bytearray (GH-31867)
This commit is contained in:
parent
894d0ea5af
commit
bd1cf6ecee
4 changed files with 13 additions and 9 deletions
|
@ -3133,7 +3133,7 @@ striter_next(striterobject *it)
|
|||
assert(PyBytes_Check(seq));
|
||||
|
||||
if (it->it_index < PyBytes_GET_SIZE(seq)) {
|
||||
return PyLong_FromLong(
|
||||
return _PyLong_FromUnsignedChar(
|
||||
(unsigned char)seq->ob_sval[it->it_index++]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue