]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934) (GH-129962)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 10 Feb 2025 16:36:10 +0000 (17:36 +0100)
committerGitHub <noreply@github.com>
Mon, 10 Feb 2025 16:36:10 +0000 (17:36 +0100)
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)

(cherry picked from commit 8d9d3e4ecb4c908df6560b54138dd5af73b3ed47)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Doc/c-api/unicode.rst
Doc/data/refcounts.dat

index f2263610f6fa76509d6457f16dc98a9db3376506..f75aa8f78a935127b413de7b2ac0aeac3b1b384d 100644 (file)
@@ -1330,6 +1330,13 @@ the user settings on the machine running the codec.
    in *consumed*.
 
 
+.. c:function:: PyObject* PyUnicode_DecodeCodePageStateful(int code_page, const char *str, \
+                              Py_ssize_t size, const char *errors, Py_ssize_t *consumed)
+
+   Similar to :c:func:`PyUnicode_DecodeMBCSStateful`, except uses the code page
+   specified by *code_page*.
+
+
 .. c:function:: PyObject* PyUnicode_AsMBCSString(PyObject *unicode)
 
    Encode a Unicode object using MBCS and return the result as Python bytes
index 88d283aa51e998334825993049e76c6d6201f2ea..509de0560e933338b7cc34eaa7e46bdcf8d977be 100644 (file)
@@ -2621,6 +2621,13 @@ PyUnicode_DecodeMBCSStateful:Py_ssize_t:size::
 PyUnicode_DecodeMBCSStateful:const char*:errors::
 PyUnicode_DecodeMBCSStateful:Py_ssize_t*:consumed::
 
+PyUnicode_DecodeCodePageStateful:PyObject*::+1:
+PyUnicode_DecodeCodePageStateful:int:code_page::
+PyUnicode_DecodeCodePageStateful:const char*:s::
+PyUnicode_DecodeCodePageStateful:Py_ssize_t:size::
+PyUnicode_DecodeCodePageStateful:const char*:errors::
+PyUnicode_DecodeCodePageStateful:Py_ssize_t*:consumed::
+
 PyUnicode_EncodeCodePage:PyObject*::+1:
 PyUnicode_EncodeCodePage:int:code_page::
 PyUnicode_EncodeCodePage:PyObject*:unicode:0: