Skip to content

Commit ce1ed2c

Browse files
Revert "Replace lock with assert"
This reverts commit b3874ce.
1 parent 9cd3902 commit ce1ed2c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Objects/typeobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11724,7 +11724,7 @@ fixup_slot_dispatchers(PyTypeObject *type)
1172411724
// This lock isn't strictly necessary because the type has not been
1172511725
// exposed to anyone else yet, but update_ont_slot calls find_name_in_mro
1172611726
// where we'd like to assert that the type is locked.
11727-
ASSERT_NEW_TYPE_OR_LOCKED(type);
11727+
BEGIN_TYPE_LOCK();
1172811728

1172911729
PyObject *mro = Py_NewRef(lookup_tp_mro(type));
1173011730

@@ -11767,6 +11767,7 @@ fixup_slot_dispatchers(PyTypeObject *type)
1176711767
Py_XDECREF(mro_dict);
1176811768
Py_DECREF(mro);
1176911769

11770+
END_TYPE_LOCK();
1177011771
return res;
1177111772
}
1177211773

0 commit comments

Comments
 (0)