We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a1d1d66 commit f7583b2Copy full SHA for f7583b2
Objects/bytearrayobject.c
@@ -1374,12 +1374,15 @@ static int
1374
bytearray_contains(PyObject *self, PyObject *arg)
1375
{
1376
int ret;
1377
+ Py_BEGIN_CRITICAL_SECTION(self);
1378
Py_buffer selfbuf;
1379
if (PyObject_GetBuffer((PyObject *)self, &selfbuf, PyBUF_SIMPLE) != 0) {
1380
+ Py_END_CRITICAL_SECTION();
1381
return -1;
1382
}
1383
ret = _Py_bytes_contains((const char *)selfbuf.buf, selfbuf.len, arg);
1384
PyBuffer_Release(&selfbuf);
1385
1386
return ret;
1387
1388
0 commit comments