[pypy-svn] r70873 - pypy/branch/stringbuilder2/pypy/rpython/lltypesystem

fijal at codespeak.net fijal at codespeak.net
Tue Jan 26 12:07:07 CET 2010


Author: fijal
Date: Tue Jan 26 12:07:07 2010
New Revision: 70873

Modified:
   pypy/branch/stringbuilder2/pypy/rpython/lltypesystem/ll_str.py
Log:
Revert 70872. It requires separate thinking & branch


Modified: pypy/branch/stringbuilder2/pypy/rpython/lltypesystem/ll_str.py
==============================================================================
--- pypy/branch/stringbuilder2/pypy/rpython/lltypesystem/ll_str.py	(original)
+++ pypy/branch/stringbuilder2/pypy/rpython/lltypesystem/ll_str.py	Tue Jan 26 12:07:07 2010
@@ -4,15 +4,13 @@
 
 CHAR_ARRAY = GcArray(Char)
 
-# It's more efficient, but not thread safe!
-temp = malloc(CHAR_ARRAY, 25)
-
 def ll_int_str(repr, i):
     return ll_int2dec(i)
 ll_int_str._pure_function_ = True
 
 def ll_int2dec(i):
     from pypy.rpython.lltypesystem.rstr import mallocstr
+    temp = malloc(CHAR_ARRAY, 20)
     len = 0
     sign = 0
     if i < 0:
@@ -49,6 +47,7 @@
 
 def ll_int2hex(i, addPrefix):
     from pypy.rpython.lltypesystem.rstr import mallocstr
+    temp = malloc(CHAR_ARRAY, 20)
     len = 0
     sign = 0
     if i < 0:
@@ -90,6 +89,7 @@
         result.hash = 0
         result.chars[0] = '0'
         return result
+    temp = malloc(CHAR_ARRAY, 25)
     len = 0
     sign = 0
     if i < 0:



More information about the Pypy-commit mailing list