]> granicus.if.org Git - python/commit
Close #17694: Add minimum length to _PyUnicodeWriter
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 17 Apr 2013 21:02:17 +0000 (23:02 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 17 Apr 2013 21:02:17 +0000 (23:02 +0200)
commit8f674ccd6442fd4d415f2d9d1ad8b09c1b4f9f30
tree8c66aa5789027ee1ed14128aa6ad6d85e1b076a7
parente84a51c38edc35e4c1e1df6b28b1e3be95ba8d00
Close #17694: Add minimum length to _PyUnicodeWriter

 * Add also min_char attribute to _PyUnicodeWriter structure (currently unused)
 * _PyUnicodeWriter_Init() has no more argument (except the writer itself):
   min_length and overallocate must be set explicitly
 * In error handlers, only enable overallocation if the replacement string
   is longer than 1 character
 * CJK decoders don't use overallocation anymore
 * Set min_length, instead of preallocating memory using
   _PyUnicodeWriter_Prepare(), in many decoders
 * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow
Include/unicodeobject.h
Modules/cjkcodecs/multibytecodec.c
Objects/complexobject.c
Objects/floatobject.c
Objects/longobject.c
Objects/stringlib/unicode_format.h
Objects/unicodeobject.c