mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #28379: Added sanity checks and tests for PyUnicode_CopyCharacters().
Patch by Xiang Zhang.
This commit is contained in:
parent
48b1c3fcfc
commit
9c0e1f83af
5 changed files with 94 additions and 7 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue