Skip to content

Commit

Permalink
Call _PyType_CheckConsistency() after setting the fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnowcurrently committed May 2, 2023
1 parent 1f212cf commit 05711e6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -7274,15 +7274,12 @@ _PyStaticType_InitBuiltin(PyInterpreterState *interp, PyTypeObject *self)

static_builtin_state_init(interp, self);

/* Per-interpreter tp_subclasses is done lazily.
Otherwise we would initialize it here. */

assert(_PyType_CheckConsistency(self));
/* We must explicitly set these for subinterpreters.
tp_subclasses is set lazily. */
type_ready_set_dict(self);
type_ready_set_bases(self);
type_ready_mro(self);
assert(_PyType_CheckConsistency(self));
return 0;
}

Expand Down

0 comments on commit 05711e6

Please sign in to comment.