[pypy-svn] r48048 - pypy/dist/pypy/lang/smalltalk

oscar at codespeak.net oscar at codespeak.net
Fri Oct 26 14:01:08 CEST 2007


Author: oscar
Date: Fri Oct 26 14:01:07 2007
New Revision: 48048

Modified:
   pypy/dist/pypy/lang/smalltalk/squeakimage.py
Log:
(arigo, oscar) fixed another slice assertion


Modified: pypy/dist/pypy/lang/smalltalk/squeakimage.py
==============================================================================
--- pypy/dist/pypy/lang/smalltalk/squeakimage.py	(original)
+++ pypy/dist/pypy/lang/smalltalk/squeakimage.py	Fri Oct 26 14:01:07 2007
@@ -24,12 +24,13 @@
     sum = 0
     for length in lengths:
         sum += length
-        result.append(integer & (2**length - 1))
+        n = integer & (2**length - 1)
+        assert n >= 0
+        result.append(n)
         integer = integer >> length
     assert sum <= 32
     return result
 
-
 # ____________________________________________________________
 #
 # Reads an image file and creates all model objects
@@ -121,7 +122,7 @@
             self.chunks[pos + self.oldbaseaddress] = chunk
         self.stream.close()    
         self.swap = self.stream.swap #save for later
-        del self.stream
+        self.stream = None
         return self.chunklist # return for testing
 
     def init_g_objects(self):



More information about the Pypy-commit mailing list