summaryrefslogtreecommitdiff
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-10 18:21:34 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-10 18:21:34 +0200
commit87a5c515d03f3e2215f3da7b90a4b848ac510879 (patch)
tree84a23e66140538f0d8b870379826b809be2c65b7 /Python/pystate.c
parent8f9f0f12e845034080525c6a80d52215533cb2a4 (diff)
downloadcpython-git-87a5c515d03f3e2215f3da7b90a4b848ac510879.tar.gz
Issue #19255: The builtins module is restored to initial value before
cleaning other modules. The sys and builtins modules are cleaned last.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 19fceb7127..2ac2fd5274 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -72,6 +72,7 @@ PyInterpreterState_New(void)
interp->modules_by_index = NULL;
interp->sysdict = NULL;
interp->builtins = NULL;
+ interp->builtins_copy = NULL;
interp->tstate_head = NULL;
interp->codec_search_path = NULL;
interp->codec_search_cache = NULL;
@@ -115,6 +116,7 @@ PyInterpreterState_Clear(PyInterpreterState *interp)
Py_CLEAR(interp->modules_by_index);
Py_CLEAR(interp->sysdict);
Py_CLEAR(interp->builtins);
+ Py_CLEAR(interp->builtins_copy);
Py_CLEAR(interp->importlib);
}