From: RUANG (James Roy) Date: Mon, 14 Apr 2025 16:40:39 +0000 (+0800) Subject: gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) X-Git-Tag: v3.14.0b1~481 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8768df2fe94a8444baff47a5b8c7414a2118731a;p=thirdparty%2FPython%2Fcpython.git gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040) --- diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst index e07121f17d9c..778ee9890c5a 100644 --- a/Doc/c-api/unicode.rst +++ b/Doc/c-api/unicode.rst @@ -596,6 +596,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 14629fbff0fb..47b417eed6ef 100644 --- a/Doc/data/refcounts.dat +++ b/Doc/data/refcounts.dat @@ -2770,6 +2770,9 @@ PyUnicode_FromFormatV:PyObject*::+1: PyUnicode_FromFormatV:const char*:format:: PyUnicode_FromFormatV:va_list:args:: +PyUnicode_FromOrdinal:PyObject*::+1: +PyUnicode_FromOrdinal:int:ordinal:: + PyUnicode_Append:void::: PyUnicode_Append:PyObject**:p_left:0: PyUnicode_Append:PyObject*:right::