Skip to content

Commit b3874ce

Browse files
Replace lock with assert
1 parent ede356d commit b3874ce

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Objects/typeobject.c

Lines changed: 1 addition & 2 deletions
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-
BEGIN_TYPE_LOCK();
11727+
ASSERT_NEW_TYPE_OR_LOCKED(type);
1172811728

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

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

11770-
END_TYPE_LOCK();
1177111770
return res;
1177211771
}
1177311772

0 commit comments

Comments
 (0)