From: Victor Stinner Date: Mon, 14 Apr 2025 16:48:40 +0000 (+0200) Subject: [3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#132521) X-Git-Tag: v3.13.4~274 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=866b6359e5a4844fc1ea24b72129595221e2c50e;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (#132521) gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) (cherry picked from commit 8768df2fe94a8444baff47a5b8c7414a2118731a) Co-authored-by: RUANG (James Roy) --- diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index a62a4e93a3d1..d9b6b1f8b93b 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -589,6 +589,14 @@ APIs: Objects other than Unicode or its subtypes will cause a :exc:`TypeError`. +.. c:function:: PyObject* PyUnicode_FromOrdinal(int ordinal) + + Create a Unicode Object from the given Unicode code point *ordinal*. + + The ordinal must be in ``range(0x110000)``. A :exc:`ValueError` is + raised in the case it is not. + + .. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \ const char *encoding, const char *errors) diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat index 987aa2d60dac..964914aa714f 100644 --- a/Doc/data/refcounts.dat +++ b/Doc/data/refcounts.dat @@ -2756,6 +2756,9 @@ PyUnicode_FromFormatV:PyObject*::+1: PyUnicode_FromFormatV:const char*:format:: PyUnicode_FromFormatV:va_list:args:: +PyUnicode_FromOrdinal:PyObject*::+1: +PyUnicode_FromOrdinal:int:ordinal:: + PyUnicode_GetDefaultEncoding:const char*::: PyUnicode_GetDefaultEncoding::void::