summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2023-04-27 06:05:35 (GMT)
committerGitHub <noreply@github.com>2023-04-27 06:05:35 (GMT)
commit4041251a3620877e840a5c996473f12f2bdf249c (patch)
treef723e9eb4fdd29f4e8370bd3b3be7f72d47a1fb1 /Doc/c-api
parentc0b538b02f49d9df0d42de42f47366f36e38ea63 (diff)
downloadcpython-4041251a3620877e840a5c996473f12f2bdf249c.zip
cpython-4041251a3620877e840a5c996473f12f2bdf249c.tar.gz
cpython-4041251a3620877e840a5c996473f12f2bdf249c.tar.bz2
gh-103883: Doc: Move PyUnicode_FromObject doc (GH-103913)
This API is one of Unicode creator APIs. This APIs should not be placed in PEP 393 deprecated APIs. Fixes: gh-103883 (cherry picked from commit ce2383ec6665850a1bdffad388876481b6f3205f)
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/unicode.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index e72f151..12f95a2 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -572,6 +572,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)
@@ -752,15 +761,6 @@ Extension modules can continue using them, as they will not be removed in Python
:c:func:`PyUnicode_GET_LENGTH`.
-.. 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
"""""""""""""""