Skip to content

Commit 9d1ae53

Browse files
use PyDict_Clear
1 parent 4bf573e commit 9d1ae53

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Objects/odictobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,8 @@ odict_tp_clear(PyObject *op)
14751475
{
14761476
PyODictObject *od = _PyODictObject_CAST(op);
14771477
Py_CLEAR(od->od_inst_dict);
1478-
_PyDict_Clear_LockHeld((PyObject *)od);
1478+
// cannot use lock held variant as critical section is not held here
1479+
PyDict_Clear(op);
14791480
_odict_clear_nodes(od);
14801481
return 0;
14811482
}

0 commit comments

Comments
 (0)