We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bcacab4 commit 976dec9Copy full SHA for 976dec9
Objects/listobject.c
@@ -15,6 +15,8 @@ class list "PyListObject *" "&PyList_Type"
15
16
#include "clinic/listobject.c.h"
17
18
+static PyObject *indexerr = NULL;
19
+
20
#if PyList_MAXFREELIST > 0
21
static struct _Py_list_state *
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;
127
#endif
128
129
+ if (_Py_IsMainInterpreter(interp)) {
130
+ Py_CLEAR(indexerr);
131
+ }
132
}
133
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
231
226
232
227
-static PyObject *indexerr = NULL;
228
-
229
233
PyObject *
234
PyList_GetItem(PyObject *op, Py_ssize_t i)
235
{
0 commit comments