mirror of
				https://github.com/python/cpython.git
				synced 2025-10-25 02:43:41 +00:00 
			
		
		
		
	Backout d2c1521ad0a1: _Py_IDENTIFIER() uses UTF-8 again
This commit is contained in:
		
							parent
							
								
									cae1068e82
								
							
						
					
					
						commit
						d1cd99b533
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -1744,8 +1744,9 @@ PyObject * | |||
| _PyUnicode_FromId(_Py_Identifier *id) | ||||
| { | ||||
|     if (!id->object) { | ||||
|         id->object = unicode_fromascii((unsigned char*)id->string, | ||||
|                                        strlen(id->string)); | ||||
|         id->object = PyUnicode_DecodeUTF8Stateful(id->string, | ||||
|                                                   strlen(id->string), | ||||
|                                                   NULL, NULL); | ||||
|         if (!id->object) | ||||
|             return NULL; | ||||
|         PyUnicode_InternInPlace(&id->object); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner