mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
PyUnicode_CopyCharacters() fails if 'to' has more than 1 reference
This commit is contained in:
parent
7c8c1ea3ec
commit
f5ca1a21a5
2 changed files with 10 additions and 1 deletions
|
@ -522,7 +522,8 @@ PyAPI_FUNC(int) _PyUnicode_Ready(
|
|||
character conversion when necessary and falls back to memcpy if possible.
|
||||
|
||||
Fail if 'to' is smaller than how_many or smaller than len(from)-from_start,
|
||||
or if kind(from[from_start:from_start+how_many]) > kind(to).
|
||||
or if kind(from[from_start:from_start+how_many]) > kind(to), or if to has
|
||||
more than 1 reference.
|
||||
|
||||
Return the number of written character, or return -1 and raise an exception
|
||||
on error.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue