]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)
authorYuki Kobayashi <drsuaimqjgar@gmail.com>
Mon, 10 Feb 2025 16:17:37 +0000 (01:17 +0900)
committerGitHub <noreply@github.com>
Mon, 10 Feb 2025 16:17:37 +0000 (17:17 +0100)
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 94110d48ed7d85ffc9c53ef21d1a91de848c55f0..97c7062178ac0bdc09b859450b47bed9ab92ab51 100644 (file)
@@ -1352,6 +1352,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 d709d2d91b0eb00b226448f8e8978e90113eb437..a483c57cb2ce06cffc749d9a50c8d877b3a3e2ef 100644 (file)
@@ -2636,6 +2636,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: