Browse Source
bpo-40521: Fix _PyContext_Fini() (GH-21103)
Only clear _token_missing in the main interpreter.
pull/21109/head
Victor Stinner
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
Python/context.c
|
|
|
@ -1302,7 +1302,9 @@ _PyContext_ClearFreeList(PyThreadState *tstate) |
|
|
|
void |
|
|
|
_PyContext_Fini(PyThreadState *tstate) |
|
|
|
{ |
|
|
|
Py_CLEAR(_token_missing); |
|
|
|
if (_Py_IsMainInterpreter(tstate)) { |
|
|
|
Py_CLEAR(_token_missing); |
|
|
|
} |
|
|
|
_PyContext_ClearFreeList(tstate); |
|
|
|
#ifdef Py_DEBUG |
|
|
|
struct _Py_context_state *state = &tstate->interp->context; |
|
|
|
|