mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	bpo-40521: Fix PyUnicode_InternInPlace() (GH-22376)
Fix PyUnicode_InternInPlace() when the INTERNED_STRINGS macro is not defined (when the EXPERIMENTAL_ISOLATED_SUBINTERPRETERS macro is defined).
This commit is contained in:
		
							parent
							
								
									19c3ac92bf
								
							
						
					
					
						commit
						7f413a5d95
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -15754,6 +15754,10 @@ PyUnicode_InternInPlace(PyObject **p) | |||
|        this. */ | ||||
|     Py_SET_REFCNT(s, Py_REFCNT(s) - 2); | ||||
|     _PyUnicode_STATE(s).interned = SSTATE_INTERNED_MORTAL; | ||||
| #else | ||||
|     // PyDict expects that interned strings have their hash
 | ||||
|     // (PyASCIIObject.hash) already computed.
 | ||||
|     (void)unicode_hash(s); | ||||
| #endif | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner