Skip to content
Prev Previous commit
Next Next commit
Add an assert.
  • Loading branch information
ericsnowcurrently committed Mar 3, 2023
commit c32b834c8135ae7f78137309d2cd0d78d22be30b
2 changes: 2 additions & 0 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ type_mro_modified(PyTypeObject *type, PyObject *bases) {
}
}
return;

clear:
assert(!(type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
type->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
type->tp_version_tag = 0; /* 0 is not a valid version tag */
}
Expand Down