]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-103883: Doc: Move PyUnicode_FromObject doc (#103913)
authorInada Naoki <songofacandy@gmail.com>
Thu, 27 Apr 2023 05:53:11 +0000 (14:53 +0900)
committerGitHub <noreply@github.com>
Thu, 27 Apr 2023 05:53:11 +0000 (14:53 +0900)
This API is one of Unicode creator APIs.

Doc/c-api/unicode.rst

index f062f14e9a75614db2cc34f6c76e10444ca02792..ab3a2e274d939513adb03e4b8dd31a06f7f91177 100644 (file)
@@ -509,6 +509,15 @@ APIs:
    arguments.
 
 
+.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)
+
+   Copy an instance of a Unicode subtype to a new true Unicode object if
+   necessary. If *obj* is already a true Unicode object (not a subtype),
+   return the reference with incremented refcount.
+
+   Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.
+
+
 .. c:function:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, \
                                const char *encoding, const char *errors)
 
@@ -616,15 +625,6 @@ APIs:
    .. versionadded:: 3.3
 
 
-.. c:function:: PyObject* PyUnicode_FromObject(PyObject *obj)
-
-   Copy an instance of a Unicode subtype to a new true Unicode object if
-   necessary. If *obj* is already a true Unicode object (not a subtype),
-   return the reference with incremented refcount.
-
-   Objects other than Unicode or its subtypes will cause a :exc:`TypeError`.
-
-
 Locale Encoding
 """""""""""""""