• Victor Stinner's avatar
    Rewrite PyUnicode_Append(); unicode_modifiable() is more strict · 488fa49a
    Victor Stinner authored
     * 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
    488fa49a
unicodeobject.c 423 KB