mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
PyUnicode_WriteChar() raises IndexError on invalid index
PyUnicode_WriteChar() raises also a ValueError if the string has more than 1 reference.
This commit is contained in:
parent
2fe5ced752
commit
cd9950fd09
2 changed files with 24 additions and 8 deletions
|
@ -647,7 +647,9 @@ PyAPI_FUNC(Py_UCS4) PyUnicode_ReadChar(
|
|||
);
|
||||
|
||||
/* Write a character to the string. The string must have been created through
|
||||
PyUnicode_New, must not be shared, and must not have been hashed yet. */
|
||||
PyUnicode_New, must not be shared, and must not have been hashed yet.
|
||||
|
||||
Return 0 on success, -1 on error. */
|
||||
|
||||
PyAPI_FUNC(int) PyUnicode_WriteChar(
|
||||
PyObject *unicode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue