summaryrefslogtreecommitdiffstats
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2003-03-19 00:35:36 (GMT)
committerGustavo Niemeyer <gustavo@niemeyer.net>2003-03-19 00:35:36 (GMT)
commit5ddd4c3f77abe9282479d901696dfa73e6c3d573 (patch)
tree1a36a11befd6fd5d1dc8a689a2cb39d2de487357 /Python/pystate.c
parent821a0fc140762c281b10dea4bb8676e913007270 (diff)
downloadcpython-5ddd4c3f77abe9282479d901696dfa73e6c3d573.zip
cpython-5ddd4c3f77abe9282479d901696dfa73e6c3d573.tar.gz
cpython-5ddd4c3f77abe9282479d901696dfa73e6c3d573.tar.bz2
Fixed SF bug #663074. The codec system was using global static
variables to store internal data. As a result, any atempts to use the unicode system with multiple active interpreters, or successive interpreter executions, would fail. Now that information is stored into members of the PyInterpreterState structure.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index e200ece..1139851 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -49,6 +49,9 @@ PyInterpreterState_New(void)
interp->sysdict = NULL;
interp->builtins = NULL;
interp->tstate_head = NULL;
+ interp->codec_search_path = NULL;
+ interp->codec_search_cache = NULL;
+ interp->codec_error_registry = NULL;
#ifdef HAVE_DLOPEN
#ifdef RTLD_NOW
interp->dlopenflags = RTLD_NOW;
@@ -75,6 +78,9 @@ PyInterpreterState_Clear(PyInterpreterState *interp)
for (p = interp->tstate_head; p != NULL; p = p->next)
PyThreadState_Clear(p);
HEAD_UNLOCK();
+ ZAP(interp->codec_search_path);
+ ZAP(interp->codec_search_cache);
+ ZAP(interp->codec_error_registry);
ZAP(interp->modules);
ZAP(interp->sysdict);
ZAP(interp->builtins);