diff options
author | Mark Hammond <mhammond@skippinet.com.au> | 2003-04-22 11:18:00 (GMT) |
---|---|---|
committer | Mark Hammond <mhammond@skippinet.com.au> | 2003-04-22 11:18:00 (GMT) |
commit | 6cb9029a2273ae2d9ca3c3a0a7fe1111111c2713 (patch) | |
tree | 8d052762ca10a843368ab56f2e69e2853d91b256 /Python | |
parent | ecd2fdca0f9461b149ca6d0bcf070deac5e7ca9a (diff) | |
download | cpython-6cb9029a2273ae2d9ca3c3a0a7fe1111111c2713.zip cpython-6cb9029a2273ae2d9ca3c3a0a7fe1111111c2713.tar.gz cpython-6cb9029a2273ae2d9ca3c3a0a7fe1111111c2713.tar.bz2 |
PyGILState cleanup was too early - destructors called via module cleanup may use the API.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pythonrun.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index e5759b7..a8dedde 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -254,11 +254,6 @@ Py_Finalize(void) call_sys_exitfunc(); initialized = 0; - /* Cleanup auto-thread-state */ -#ifdef WITH_THREAD - _PyGILState_Fini(); -#endif /* WITH_THREAD */ - /* Get current thread state and interpreter pointer */ tstate = PyThreadState_Get(); interp = tstate->interp; @@ -310,6 +305,11 @@ Py_Finalize(void) */ _PyExc_Fini(); + /* Cleanup auto-thread-state */ +#ifdef WITH_THREAD + _PyGILState_Fini(); +#endif /* WITH_THREAD */ + /* Clear interpreter state */ PyInterpreterState_Clear(interp); |