PyUnicode_WriteChar() raises IndexError on invalid index
PyUnicode_WriteChar() raises also a ValueError if the string has more than 1
reference.
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index bba1c23..d0d44e1 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -647,7 +647,9 @@
);
/* 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,