PyUnicode_WriteChar() raises IndexError on invalid index

PyUnicode_WriteChar() raises also a ValueError if the string has more than 1
reference.
2 files changed