Skip to content

Commit 74eabaf

Browse files
Trying to fix build
1 parent 23aaee0 commit 74eabaf

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Objects/typeobject.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11460,7 +11460,10 @@ fixup_slot_dispatchers(PyTypeObject *type)
1146011460
{
1146111461
int res = 0;
1146211462

11463-
ASSERT_WORLD_STOPPED_OR_NEW_TYPE(type);
11463+
// This lock isn't strictly necessary because the type has not been
11464+
// exposed to anyone else yet, but update_ont_slot calls find_name_in_mro
11465+
// where we'd like to assert that the type is locked.
11466+
BEGIN_TYPE_LOCK();
1146411467

1146511468
PyObject *mro = Py_NewRef(lookup_tp_mro(type));
1146611469

@@ -11502,6 +11505,8 @@ fixup_slot_dispatchers(PyTypeObject *type)
1150211505
finish:
1150311506
Py_XDECREF(mro_dict);
1150411507
Py_DECREF(mro);
11508+
11509+
END_TYPE_LOCK();
1150511510
return res;
1150611511
}
1150711512

0 commit comments

Comments
 (0)