Skip to content

Commit dcdc517

Browse files
remove lock from get container
1 parent 3af4f9e commit dcdc517

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2838,9 +2838,8 @@ static PyType_Spec pycfuncptr_type_spec = {
28382838
*/
28392839

28402840
static CDataObject *
2841-
PyCData_GetContainer_lock_held(CDataObject *self)
2841+
PyCData_GetContainer(CDataObject *self)
28422842
{
2843-
_Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(self);
28442843
while (self->b_base) {
28452844
self = self->b_base;
28462845
}
@@ -2856,16 +2855,6 @@ PyCData_GetContainer_lock_held(CDataObject *self)
28562855
return self;
28572856
}
28582857

2859-
static CDataObject *
2860-
PyCData_GetContainer(CDataObject *self)
2861-
{
2862-
CDataObject *res;
2863-
Py_BEGIN_CRITICAL_SECTION(self);
2864-
res = PyCData_GetContainer_lock_held(self);
2865-
Py_END_CRITICAL_SECTION();
2866-
return res;
2867-
}
2868-
28692858
static PyObject *
28702859
GetKeepedObjects(CDataObject *target)
28712860
{

0 commit comments

Comments
 (0)