Skip to content

Commit 181e924

Browse files
miss-islingtonkoyuki7wStanFromIrelandZeroIntensity
authored
[3.12] gh-46236: Document PyUnicode_DecodeCodePageStateful (GH-127934) (GH-129962)
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934) (cherry picked from commit 8d9d3e4) Co-authored-by: Yuki Kobayashi <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]> Co-authored-by: Peter Bierma <[email protected]>
1 parent 2db4a9d commit 181e924

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Doc/c-api/unicode.rst

+7
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,13 @@ the user settings on the machine running the codec.
13301330
in *consumed*.
13311331
13321332
1333+
.. c:function:: PyObject* PyUnicode_DecodeCodePageStateful(int code_page, const char *str, \
1334+
Py_ssize_t size, const char *errors, Py_ssize_t *consumed)
1335+
1336+
Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page
1337+
specified by *code_page*.
1338+
1339+
13331340
.. c:function:: PyObject* PyUnicode_AsMBCSString(PyObject *unicode)
13341341
13351342
Encode a Unicode object using MBCS and return the result as Python bytes

Doc/data/refcounts.dat

+7
Original file line numberDiff line numberDiff line change
@@ -2621,6 +2621,13 @@ PyUnicode_DecodeMBCSStateful:Py_ssize_t:size::
26212621
PyUnicode_DecodeMBCSStateful:const char*:errors::
26222622
PyUnicode_DecodeMBCSStateful:Py_ssize_t*:consumed::
26232623

2624+
PyUnicode_DecodeCodePageStateful:PyObject*::+1:
2625+
PyUnicode_DecodeCodePageStateful:int:code_page::
2626+
PyUnicode_DecodeCodePageStateful:const char*:s::
2627+
PyUnicode_DecodeCodePageStateful:Py_ssize_t:size::
2628+
PyUnicode_DecodeCodePageStateful:const char*:errors::
2629+
PyUnicode_DecodeCodePageStateful:Py_ssize_t*:consumed::
2630+
26242631
PyUnicode_EncodeCodePage:PyObject*::+1:
26252632
PyUnicode_EncodeCodePage:int:code_page::
26262633
PyUnicode_EncodeCodePage:PyObject*:unicode:0:

0 commit comments

Comments
 (0)