File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -621,6 +621,16 @@ APIs:
621
621
decref'ing the returned objects.
622
622
623
623
624
+ .. c:function:: PyObject* PyUnicode_BuildEncodingMap(PyObject* string)
625
+
626
+ Return a mapping suitable for decoding a custom single-byte encoding.
627
+ Given a Unicode string *string* of up to 256 characters representing an encoding
628
+ table, returns either a compact internal mapping object or a dictionary
629
+ mapping character ordinals to byte values. Raises a :exc:`TypeError` and
630
+ return ``NULL`` on invalid input.
631
+ .. versionadded:: 3.2
632
+
633
+
624
634
.. c:function:: const char* PyUnicode_GetDefaultEncoding(void)
625
635
626
636
Return the name of the default string encoding, ``"utf-8"``.
Original file line number Diff line number Diff line change @@ -2759,6 +2759,9 @@ PyUnicode_FromFormatV:va_list:args::
2759
2759
PyUnicode_FromOrdinal:PyObject*::+1:
2760
2760
PyUnicode_FromOrdinal:int:ordinal::
2761
2761
2762
+ PyUnicode_BuildEncodingMap:PyObject*::+1:
2763
+ PyUnicode_BuildEncodingMap:PyObject*:string:::
2764
+
2762
2765
PyUnicode_GetDefaultEncoding:const char*:::
2763
2766
PyUnicode_GetDefaultEncoding::void::
2764
2767
You can’t perform that action at this time.
0 commit comments