File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ class list "PyListObject *" "&PyList_Type"
15
15
16
16
#include "clinic/listobject.c.h"
17
17
18
+ static PyObject * indexerr = NULL ;
19
+
18
20
#if PyList_MAXFREELIST > 0
19
21
static struct _Py_list_state *
20
22
get_list_state (void )
@@ -123,6 +125,10 @@ _PyList_Fini(PyInterpreterState *interp)
123
125
struct _Py_list_state * state = & interp -> list ;
124
126
state -> numfree = -1 ;
125
127
#endif
128
+
129
+ if (_Py_IsMainInterpreter (interp )) {
130
+ Py_CLEAR (indexerr );
131
+ }
126
132
}
127
133
128
134
/* Print summary info about the state of the optimized allocator */
@@ -224,8 +230,6 @@ valid_index(Py_ssize_t i, Py_ssize_t limit)
224
230
return (size_t ) i < (size_t ) limit ;
225
2
5A7F
31
}
226
232
227
- static PyObject * indexerr = NULL ;
228
-
229
233
PyObject *
230
234
PyList_GetItem (PyObject * op , Py_ssize_t i )
231
235
{
You can’t perform that action at this time.
0 commit comments