mirror of
https://github.com/python/cpython.git
synced 2026-06-23 03:23:38 -04:00
gh-149816: add missing critical section on self in buffered_iternext (#150295)
This commit is contained in:
@@ -1509,7 +1509,9 @@ buffered_iternext(PyObject *op)
|
||||
tp == state->PyBufferedRandom_Type)
|
||||
{
|
||||
/* Skip method call overhead for speed */
|
||||
Py_BEGIN_CRITICAL_SECTION(self);
|
||||
line = _buffered_readline(self, -1);
|
||||
Py_END_CRITICAL_SECTION();
|
||||
}
|
||||
else {
|
||||
line = PyObject_CallMethodNoArgs((PyObject *)self,
|
||||
|
||||
Reference in New Issue
Block a user