[pypy-svn] r46873 - pypy/dist/pypy/module/zlib

arigo at codespeak.net arigo at codespeak.net
Tue Sep 25 20:07:33 CEST 2007


Author: arigo
Date: Tue Sep 25 20:07:32 2007
New Revision: 46873

Modified:
   pypy/dist/pypy/module/zlib/interp_zlib.py
Log:
Typos found by running pypy/bin/checkmodule.py.


Modified: pypy/dist/pypy/module/zlib/interp_zlib.py
==============================================================================
--- pypy/dist/pypy/module/zlib/interp_zlib.py	(original)
+++ pypy/dist/pypy/module/zlib/interp_zlib.py	Tue Sep 25 20:07:32 2007
@@ -2,6 +2,7 @@
 from pypy.interpreter.baseobjspace import Wrappable
 from pypy.interpreter.typedef import TypeDef
 from pypy.interpreter.error import OperationError
+from pypy.rlib.rarithmetic import intmask
 
 from pypy.rlib import rzlib
 
@@ -19,7 +20,7 @@
     # CPython exposes it as a signed value, though. -exarkun
     # The value *is* unsigned on 64-bit platforms in CPython... bah.
     # For now let's do the same as CPython and boldly cast to a C long. -arigo
-    checksum = int(checksum)
+    checksum = intmask(checksum)
 
     return space.wrap(checksum)
 crc32.unwrap_spec = [ObjSpace, str, int]
@@ -38,7 +39,7 @@
     # CPython exposes it as a signed value, though. -exarkun
     # The value *is* unsigned on 64-bit platforms in CPython... bah.
     # For now let's do the same as CPython and boldly cast to a C long. -arigo
-    checksum = int(checksum)
+    checksum = intmask(checksum)
 
     return space.wrap(checksum)
 adler32.unwrap_spec = [ObjSpace, str, int]
@@ -118,7 +119,7 @@
         """Automatically free the resources used by the stream."""
         if self.stream:
             rzlib.deflateEnd(self.stream)
-            self.stream = null_stream
+            self.stream = rzlib.null_stream
 
 
     def compress(self, data):
@@ -209,7 +210,7 @@
         """Automatically free the resources used by the stream."""
         if self.stream:
             rzlib.inflateEnd(self.stream)
-            self.stream = null_stream
+            self.stream = rzlib.null_stream
 
 
     def decompress(self, data, max_length=0):



More information about the Pypy-commit mailing list