8000
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 7a23841 commit 3699d15Copy full SHA for 3699d15
Python/import.c
@@ -2183,7 +2183,7 @@ clear_singlephase_extension(PyInterpreterState *interp,
2183
/* Clear data set when the module was initially loaded. */
2184
def->m_base.m_init = NULL;
2185
Py_CLEAR(def->m_base.m_copy);
2186
- // We leave m_index alone since there's no reason to reset it.
+ def->m_base.m_index = 0;
2187
2188
/* Clear the PyState_*Module() cache entry. */
2189
Py_ssize_t index = _get_cached_module_index(cached);
@@ -2192,7 +2192,6 @@ clear_singlephase_extension(PyInterpreterState *interp,
2192
return -1;
2193
}
2194
2195
- def->m_base.m_index = 0;
2196
2197
/* Clear the cached module def. */
2198
_extensions_cache_delete(path, name);
0 commit comments