[pypy-svn] r15717 - pypy/dist/pypy/objspace/std

tismer at codespeak.net tismer at codespeak.net
Sat Aug 6 12:46:19 CEST 2005


Author: tismer
Date: Sat Aug  6 12:46:18 2005
New Revision: 15717

Modified:
   pypy/dist/pypy/objspace/std/stringobject.py
Log:
enabling marshal:

had to initialize buffer in the exception case of mul_string_times.
This was strange, because this was not consequently always needed.
There seems to be some non-determinism.

I found no way to reliably reproduce this. When finally trying
to remove it, the problem came up, again, so I kept it.

Modified: pypy/dist/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/stringobject.py	(original)
+++ pypy/dist/pypy/objspace/std/stringobject.py	Sat Aug  6 12:46:18 2005
@@ -971,6 +971,9 @@
     except (MemoryError,OverflowError,ValueError):
         # ugh. ValueError is what you get on 64-bit machines for
         # integers in range(2**31, 2**63).
+        # XXX needed to initialize buffer for rtyper. Strange,
+        # because it's need seems to vary!
+        buffer = [' ']
         raise OperationError( space.w_OverflowError, space.wrap("repeated string is too long: %d %d" % (input_len,mul) ))
 
     pos = 0



More information about the Pypy-commit mailing list