summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2004-01-02 23:25:32 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2004-01-02 23:25:32 (GMT)
commitecd9129c94318135b38578f896d00f895f1b231a (patch)
tree37460d2a5c9327242f27647fbbe298a5f399c0aa /Python/import.c
parent203eec46c1c5319d22ba95ab57f638fb3e86ae4c (diff)
downloadcpython-ecd9129c94318135b38578f896d00f895f1b231a.zip
cpython-ecd9129c94318135b38578f896d00f895f1b231a.tar.gz
cpython-ecd9129c94318135b38578f896d00f895f1b231a.tar.bz2
Add comment to mollify Tim.
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 77a5605..e6ea3dd 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -594,6 +594,8 @@ PyImport_ExecCodeModuleEx(char *name, PyObject *co, char *pathname)
m = PyImport_AddModule(name);
if (m == NULL)
return NULL;
+ /* If the module is being reloaded, we get the old module back
+ and re-use its dict to exec the new code. */
d = PyModule_GetDict(m);
if (PyDict_GetItemString(d, "__builtins__") == NULL) {
if (PyDict_SetItemString(d, "__builtins__",