Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 707310a commit abae429Copy full SHA for abae429
1 file changed
Objects/typeobject.c
@@ -121,10 +121,10 @@ static_builtin_state_init(PyTypeObject *self)
121
PyInterpreterState *interp = _PyInterpreterState_GET();
122
123
/* It should only be called once for each builtin type. */
124
- assert(!static_builtin_index_is_set(self));
125
-
126
- static_builtin_index_set(self, interp->types.num_builtins_initialized);
127
- interp->types.num_builtins_initialized++;
+ if (!static_builtin_index_is_set(self)) {
+ static_builtin_index_set(self, interp->types.num_builtins_initialized);
+ interp->types.num_builtins_initialized++;
+ }
128
129
static_builtin_state *state = static_builtin_state_get(interp, self);
130
state->type = self;
0 commit comments