diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-11 00:30:09 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-11 00:30:09 +0200 |
commit | e4564245bddda91df68f13f211e1583ecf6f8c1a (patch) | |
tree | b95d168498e3daef609d939044182adb192b07a7 /Python/import.c | |
parent | d0786d1eff64c4b9836985fa19065dd0f5a6ebc1 (diff) | |
download | cpython-e4564245bddda91df68f13f211e1583ecf6f8c1a.tar.gz |
Issue #10241: Clear extension module dict copies at interpreter shutdown.
Patch by Neil Schemenauer, minimally modified.
(re-apply after fix for tkinter-related crash)
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c index be73d4bba8..113123d564 100644 --- a/Python/import.c +++ b/Python/import.c @@ -380,6 +380,8 @@ PyImport_Cleanup(void) builtins = interp->builtins; interp->builtins = PyDict_New(); Py_DECREF(builtins); + /* Clear module dict copies stored in the interpreter state */ + _PyState_ClearModules(); /* Collect references */ _PyGC_CollectNoFail(); /* Dump GC stats before it's too late, since it uses the warnings |