diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-01 22:34:53 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-10-01 22:34:53 (GMT) |
commit | cd9950fd094394927c0cf85560679ca6a7b33038 (patch) | |
tree | 5678a6da8d21beed514da006c3ef12ac4bbf734c /Include | |
parent | 2fe5ced752d5d17eae3e0ad23c0f7f2208770d2d (diff) | |
download | cpython-cd9950fd094394927c0cf85560679ca6a7b33038.zip cpython-cd9950fd094394927c0cf85560679ca6a7b33038.tar.gz cpython-cd9950fd094394927c0cf85560679ca6a7b33038.tar.bz2 |
PyUnicode_WriteChar() raises IndexError on invalid index
PyUnicode_WriteChar() raises also a ValueError if the string has more than 1
reference.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/unicodeobject.h | 4 |
1 files changed, 3 insertions, 1 deletions
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 @@ 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, |