File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2671,7 +2671,10 @@ _PyTypes_InitTypes(PyInterpreterState *interp)
26712671 // All other static types (unless initialized elsewhere)
26722672 for (size_t i = 0 ; i < Py_ARRAY_LENGTH (static_types ); i ++ ) {
26732673 PyTypeObject * type = static_types [i ];
2674- if (type && _PyStaticType_InitBuiltin (interp , type ) < 0 ) {
2674+ if (type == NULL ) {
2675+ continue ;
2676+ }
2677+ if (_PyStaticType_InitBuiltin (interp , type ) < 0 ) {
26752678 return _PyStatus_ERR ("Can't initialize builtin type" );
26762679 }
26772680 if (type == & PyType_Type ) {
@@ -2711,9 +2714,10 @@ _PyTypes_FiniTypes(PyInterpreterState *interp)
27112714 // their base classes.
27122715 for (Py_ssize_t i = Py_ARRAY_LENGTH (static_types )- 1 ; i >=0 ; i -- ) {
27132716 PyTypeObject * type = static_types [i ];
2714- if (type ) {
2715- _PyStaticType_FiniBuiltin ( interp , type ) ;
2717+ if (type == NULL ) {
2718+ continue ;
27162719 }
2720+ _PyStaticType_FiniBuiltin (interp , type );
27172721 }
27182722}
27192723
You can’t perform that action at this time.
0 commit comments