summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-08 19:45:38 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-08 19:45:38 (GMT)
commit9c0e1f83af433a9eebb70cd41adcff2b0d608e05 (patch)
treee3919bc1e9d43077b3a6460948479a9366693562 /Doc
parent48b1c3fcfc47b720a721ef887dd495ad667f567f (diff)
downloadcpython-9c0e1f83af433a9eebb70cd41adcff2b0d608e05.zip
cpython-9c0e1f83af433a9eebb70cd41adcff2b0d608e05.tar.gz
cpython-9c0e1f83af433a9eebb70cd41adcff2b0d608e05.tar.bz2
Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
Patch by Xiang Zhang.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/unicode.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/c-api/unicode.rst b/Doc/c-api/unicode.rst
index 261a43c..3f6a604 100644
--- a/Doc/c-api/unicode.rst
+++ b/Doc/c-api/unicode.rst
@@ -578,13 +578,16 @@ APIs:
.. versionadded:: 3.3
-.. c:function:: int PyUnicode_CopyCharacters(PyObject *to, Py_ssize_t to_start, \
- PyObject *from, Py_ssize_t from_start, Py_ssize_t how_many)
+.. c:function:: Py_ssize_t PyUnicode_CopyCharacters(PyObject *to, \
+ Py_ssize_t to_start, \
+ PyObject *from, \
+ Py_ssize_t from_start, \
+ Py_ssize_t how_many)
Copy characters from one Unicode object into another. This function performs
character conversion when necessary and falls back to :c:func:`memcpy` if
possible. Returns ``-1`` and sets an exception on error, otherwise returns
- ``0``.
+ the number of copied characters.
.. versionadded:: 3.3