https://github.com/python/cpython/commit/181e924332b7d1b87e689bb059272f9078c26fb7
commit: 181e924332b7d1b87e689bb059272f9078c26fb7
branch: 3.12
author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com>
committer: encukou <encu...@gmail.com>
date: 2025-02-10T17:36:10+01:00
summary:

[3.12] gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934) 
(GH-129962)

gh-46236: Document `PyUnicode_DecodeCodePageStateful` (GH-127934)

(cherry picked from commit 8d9d3e4ecb4c908df6560b54138dd5af73b3ed47)

Co-authored-by: Yuki Kobayashi <drsuaimqj...@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+stanfromirel...@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensity...@gmail.com>

files:
M Doc/c-api/unicode.rst
M Doc/data/refcounts.dat

diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index f2263610f6fa76..f75aa8f78a9351 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -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
diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat
index 88d283aa51e998..509de0560e9333 100644
--- a/Doc/data/refcounts.dat
+++ b/Doc/data/refcounts.dat
@@ -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:

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to