mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	gh-46236: Document PyUnicode_BuildEncodingMap (#133270)
This commit is contained in:
		
							parent
							
								
									cd2f234ad2
								
							
						
					
					
						commit
						f34ec09ba5
					
				
					 2 changed files with 14 additions and 0 deletions
				
			
		|  | @ -645,6 +645,17 @@ APIs: | ||||||
|    difference being that it decrements the reference count of *right* by one. |    difference being that it decrements the reference count of *right* by one. | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | .. c:function:: PyObject* PyUnicode_BuildEncodingMap(PyObject* string) | ||||||
|  | 
 | ||||||
|  |    Return a mapping suitable for decoding a custom single-byte encoding. | ||||||
|  |    Given a Unicode string *string* of up to 256 characters representing an encoding | ||||||
|  |    table, returns either a compact internal mapping object or a dictionary | ||||||
|  |    mapping character ordinals to byte values. Raises a :exc:`TypeError` and | ||||||
|  |    return ``NULL`` on invalid input. | ||||||
|  | 
 | ||||||
|  |    .. versionadded:: 3.2 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| .. c:function:: const char* PyUnicode_GetDefaultEncoding(void) | .. c:function:: const char* PyUnicode_GetDefaultEncoding(void) | ||||||
| 
 | 
 | ||||||
|    Return the name of the default string encoding, ``"utf-8"``. |    Return the name of the default string encoding, ``"utf-8"``. | ||||||
|  |  | ||||||
|  | @ -2778,6 +2778,9 @@ PyUnicode_AppendAndDel:void::: | ||||||
| PyUnicode_AppendAndDel:PyObject**:p_left:0: | PyUnicode_AppendAndDel:PyObject**:p_left:0: | ||||||
| PyUnicode_AppendAndDel:PyObject*:right:-1: | PyUnicode_AppendAndDel:PyObject*:right:-1: | ||||||
| 
 | 
 | ||||||
|  | PyUnicode_BuildEncodingMap:PyObject*::+1: | ||||||
|  | PyUnicode_BuildEncodingMap:PyObject*:string::: | ||||||
|  | 
 | ||||||
| PyUnicode_GetDefaultEncoding:const char*::: | PyUnicode_GetDefaultEncoding:const char*::: | ||||||
| PyUnicode_GetDefaultEncoding::void:: | PyUnicode_GetDefaultEncoding::void:: | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Stan Ulbrych
						Stan Ulbrych