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:
Victor Stinner 2011-10-02 00:34:53 +02:00
parent 2fe5ced752
commit cd9950fd09
2 changed files with 24 additions and 8 deletions

View file

@ -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,