mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-40521: Fix _PyContext_Fini() (GH-21103)
Only clear _token_missing in the main interpreter.
This commit is contained in:
		
							parent
							
								
									2f9ada96e0
								
							
						
					
					
						commit
						cde283d16d
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -1302,7 +1302,9 @@ _PyContext_ClearFreeList(PyThreadState *tstate) | ||||||
| void | void | ||||||
| _PyContext_Fini(PyThreadState *tstate) | _PyContext_Fini(PyThreadState *tstate) | ||||||
| { | { | ||||||
|  |     if (_Py_IsMainInterpreter(tstate)) { | ||||||
|         Py_CLEAR(_token_missing); |         Py_CLEAR(_token_missing); | ||||||
|  |     } | ||||||
|     _PyContext_ClearFreeList(tstate); |     _PyContext_ClearFreeList(tstate); | ||||||
| #ifdef Py_DEBUG | #ifdef Py_DEBUG | ||||||
|     struct _Py_context_state *state = &tstate->interp->context; |     struct _Py_context_state *state = &tstate->interp->context; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner