]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Rewrite PyUnicode_Append(); unicode_modifiable() is more strict
authorVictor Stinner <victor.stinner@haypocalc.com>
Sun, 11 Dec 2011 23:01:39 +0000 (00:01 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Sun, 11 Dec 2011 23:01:39 +0000 (00:01 +0100)
commit488fa49acffda76a6a81d3a14f85f2c65496de54
tree8702ad6e24ca25e5b15027e3276257758235a434
parent24c74be9a3b6b10dcd153d1c214013a7fd43b735
Rewrite PyUnicode_Append(); unicode_modifiable() is more strict

 * Rename unicode_resizable() to unicode_modifiable()
 * Rename _PyUnicode_Dirty() to unicode_check_modifiable() to make it clear
   that the function is private
 * Inline PyUnicode_Concat() and unicode_append_inplace() in PyUnicode_Append()
   to simplify the code
 * unicode_modifiable() return 0 if the hash has been computed or if the string
   is not an exact unicode string
 * Remove _PyUnicode_DIRTY(): no need to reset the hash anymore, because if the
   hash has already been computed, you cannot modify a string inplace anymore
 * PyUnicode_Concat() checks for integer overflow
Objects/unicodeobject.c