summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2013-08-10 22:30:09 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2013-08-10 22:30:09 (GMT)
commit40322e6ad5f705e294ded37fa4a682f065ec80a2 (patch)
treec5062765b70271c1f449ed65758447276a901347 /Python/import.c
parent584e815114b3e1862c510df6a2ccc9d9957eedc0 (diff)
downloadcpython-40322e6ad5f705e294ded37fa4a682f065ec80a2.zip
cpython-40322e6ad5f705e294ded37fa4a682f065ec80a2.tar.gz
cpython-40322e6ad5f705e294ded37fa4a682f065ec80a2.tar.bz2
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/import.c b/Python/import.c
index be73d4b..113123d 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
0 Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | | | | | | | | | | | Test-case for fixed [Bug 2849797]nijtmans2009-11-19