File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ class list "PyListObject *" "&PyList_Type"
1515
1616#include "clinic/listobject.c.h"
1717
18+ static PyObject * indexerr = NULL ;
19+
1820#if PyList_MAXFREELIST > 0
1921static struct _Py_list_state *
2022get_list_state (void )
@@ -123,6 +125,10 @@ _PyList_Fini(PyInterpreterState *interp)
123125 struct _Py_list_state * state = & interp -> list ;
124126 state -> numfree = -1 ;
125127#endif
128+
129+ if (_Py_IsMainInterpreter (interp )) {
130+ Py_CLEAR (indexerr );
131+ }
126132}
127133
128134/* Print summary info about the state of the optimized allocator */
@@ -224,8 +230,6 @@ valid_index(Py_ssize_t i, Py_ssize_t limit)
224230 return (size_t ) i < (size_t ) limit ;
225231}
226232
227- static PyObject * indexerr = NULL ;
228-
229233PyObject *
230234PyList_GetItem (PyObject * op , Py_ssize_t i )
231235{
You can’t perform that action at this time.
0 commit comments