[Python-checkins] cpython: long_to_decimal_string_internal() doesn't need to write the final NULL character

victor.stinner python-checkins at python.org
Thu Oct 4 02:47:03 CEST 2012


http://hg.python.org/cpython/rev/bd5c74def80d
changeset:   79439:bd5c74def80d
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Oct 04 02:43:02 2012 +0200
summary:
  long_to_decimal_string_internal() doesn't need to write the final NULL character

files:
  Objects/longobject.c |  1 -
  1 files changed, 0 insertions(+), 1 deletions(-)


diff --git a/Objects/longobject.c b/Objects/longobject.c
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1651,7 +1651,6 @@
         else                                                          \
             p = (TYPE*)PyUnicode_DATA(str) + strlen;                  \
                                                                       \
-        *p = '\0';                                                    \
         /* pout[0] through pout[size-2] contribute exactly            \
            _PyLong_DECIMAL_SHIFT digits each */                       \
         for (i=0; i < size - 1; i++) {                                \

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list