]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)
authorRUANG (James Roy) <longjinyii@outlook.com>
Mon, 14 Apr 2025 16:40:39 +0000 (00:40 +0800)
committerGitHub <noreply@github.com>
Mon, 14 Apr 2025 16:40:39 +0000 (18:40 +0200)
Doc/c-api/unicode.rst
Doc/data/refcounts.dat

index e07121f17d9c290c415dfc3bfdad0162640a90df..778ee9890c5a82044d86d87df85836b803b6ddeb 100644 (file)
@@ -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)
 
index 14629fbff0fb78822611c05f51afce99b3644326..47b417eed6efda90f57f969257b1bf3bd8b1efe5 100644 (file)
@@ -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::