Skip to content

Commit ea520a5

Browse files
committed
Drop critical sections\n\n3.13 bytearray is before free-threaded bytearray.
1 parent 751a787 commit ea520a5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Objects/bytearrayobject.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,10 @@ _bytearray_with_buffer(PyByteArrayObject *self, _ba_bytes_op op, PyObject *sub,
7474
{
7575
PyObject *res;
7676

77-
Py_BEGIN_CRITICAL_SECTION(self);
78-
7977
/* Increase exports to prevent bytearray storage from changing during op. */
8078
self->ob_exports++;
8179
res = op(PyByteArray_AS_STRING(self), Py_SIZE(self), sub, start, end);
8280
self->ob_exports--;
83-
Py_END_CRITICAL_SECTION(self);
8481

8582
return res;
8683
}
@@ -1265,7 +1262,6 @@ static int
12651262
bytearray_contains(PyObject *self, PyObject *arg)
12661263
{
12671264
int ret = -1;
1268-
Py_BEGIN_CRITICAL_SECTION(self);
12691265
PyByteArrayObject *ba = _PyByteArray_CAST(self);
12701266

12711267
/* Increase exports to prevent bytearray storage from changing during _Py_bytes_contains(). */
@@ -1274,7 +1270,6 @@ bytearray_contains(PyObject *self, PyObject *arg)
12741270
PyByteArray_GET_SIZE(self),
12751271
arg);
12761272
ba->ob_exports--;
1277-
Py_END_CRITICAL_SECTION();
12781273
return ret;
12791274
}
12801275

0 commit comments

Comments
 (0)