diff Objects/floatobject.c @ 83433:edf029fc9591

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
author Victor Stinner <victor.stinner@gmail.com>
date Wed, 17 Apr 2013 23:02:17 +0200
parents 07488c3c85f1
children 41a2cbe23349
line wrap: on
line diff
--- a/Objects/floatobject.c	Wed Apr 17 21:27:17 2013 +0100
+++ b/Objects/floatobject.c	Wed Apr 17 23:02:17 2013 +0200
@@ -1711,7 +1711,7 @@
     if (!PyArg_ParseTuple(args, "U:__format__", &format_spec))
         return NULL;
 
-    _PyUnicodeWriter_Init(&writer, 0);
+    _PyUnicodeWriter_Init(&writer);
     ret = _PyFloat_FormatAdvancedWriter(
         &writer,
         self,