summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorInada Naoki <songofacandy@gmail.com>2020-06-30 03:23:07 (GMT)
committerGitHub <noreply@github.com>2020-06-30 03:23:07 (GMT)
commitb3332660adb02babb7e66e45310c66dc9a9a94da (patch)
tree4eb2b2e3e92d0821ddf20b286e995119d0ce1cb9 /Doc
parent2515a28230b1a011205f30263da6b01c6bd167a3 (diff)
downloadcpython-b3332660adb02babb7e66e45310c66dc9a9a94da.zip
cpython-b3332660adb02babb7e66e45310c66dc9a9a94da.tar.gz
cpython-b3332660adb02babb7e66e45310c66dc9a9a94da.tar.bz2
bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/unicode.rst14
-rw-r--r--Doc/data/refcounts.dat3
-rw-r--r--Doc/whatsnew/3.10.rst4
3 files changed, 4 insertions, 17 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index b1787ed..0748a1e 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -724,20 +724,6 @@ Extension modules can continue using them, as they will not be removed in Python
.. versionadded:: 3.3
-.. c:function:: Py_UNICODE* PyUnicode_AsUnicodeCopy(PyObject *unicode)
-
- Create a copy of a Unicode string ending with a null code point. Return ``NULL``
- and raise a :exc:`MemoryError` exception on memory allocation failure,
- otherwise return a new allocated buffer (use :c:func:`PyMem_Free` to free
- the buffer). Note that the resulting :c:type:`Py_UNICODE*` string may
- contain embedded null code points, which would cause the string to be
- truncated when used in most C functions.
-
- .. versionadded:: 3.2
-
- Please migrate to using :c:func:`PyUnicode_AsUCS4Copy` or similar new APIs.
-
-
.. c:function:: Py_ssize_t PyUnicode_GetSize(PyObject *unicode)
Return the size of the deprecated :c:type:`Py_UNICODE` representation, in
diff --git a/Doc/data/refcounts.dat b/Doc/data/refcounts.dat
index 4d9aee3..882d7d6 100644
--- a/Doc/data/refcounts.dat
+++ b/Doc/data/refcounts.dat
@@ -2419,9 +2419,6 @@ PyUnicode_AsUnicodeAndSize:Py_UNICODE*:::
PyUnicode_AsUnicodeAndSize:PyObject*:unicode:0:
PyUnicode_AsUnicodeAndSize:Py_ssize_t*:size::
-PyUnicode_AsUnicodeCopy:Py_UNICODE*:::
-PyUnicode_AsUnicodeCopy:PyObject*:unicode:0:
-
PyUnicode_GetSize:Py_ssize_t:::
PyUnicode_GetSize:PyObject*:unicode:0:
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index a755d26..0674ce8 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -240,3 +240,7 @@ Removed
* Removed ``PyLong_FromUnicode()``. Please migrate to :c:func:`PyLong_FromUnicodeObject`.
(Contributed by Inada Naoki in :issue:`41103`.)
+
+* Removed ``PyUnicode_AsUnicodeCopy()``. Please use :c:func:`PyUnicode_AsUCS4Copy` or
+ :c:func:`PyUnicode_AsWideCharString`
+ (Contributed by Inada Naoki in :issue:`41103`.)