Skip to content

Commit 67ad6f7

Browse files
Document last one!
1 parent e5e51bd commit 67ad6f7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Doc/c-api/unicode.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,17 @@ APIs:
645645
difference being that it decrements the reference count of *right* by one.
646646
647647
648+
.. c:function:: PyObject* PyUnicode_BuildEncodingMap(PyObject* string)
649+
650+
Return a mapping suitable for decoding a custom single-byte encoding.
651+
Given a Unicode string *string* of up to 256 characters representing an encoding
652+
table, returns either a compact internal mapping object or a dictionary
653+
mapping character ordinals to byte values. Raises a :exc:`TypeError` on
654+
invalid input.
655+
656+
.. versionadded:: 3.2
657+
658+
648659
.. c:function:: const char* PyUnicode_GetDefaultEncoding(void)
649660
650661
Return the name of the default string encoding, ``"utf-8"``.

Doc/data/refcounts.dat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2781,6 +2781,9 @@ PyUnicode_AppendAndDel:void:::
27812781
PyUnicode_AppendAndDel:PyObject**:p_left:0:
27822782
PyUnicode_AppendAndDel:PyObject*:right:-1:
27832783

2784+
PyUnicode_BuildEncodingMap:PyObject*::+1:
2785+
PyUnicode_BuildEncodingMap:PyObject*:string:::
2786+
27842787
PyUnicode_GetDefaultEncoding:const char*:::
27852788
PyUnicode_GetDefaultEncoding::void::
27862789

0 commit comments

Comments
 (0)