[pypy-commit] pypy py3k: Another remaining sys.maxint

amauryfa noreply at buildbot.pypy.org
Sat Dec 1 23:23:21 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r59190:e94e112e1471
Date: 2012-12-01 14:26 +0100
http://bitbucket.org/pypy/pypy/changeset/e94e112e1471/

Log:	Another remaining sys.maxint

diff --git a/lib_pypy/_ctypes/basics.py b/lib_pypy/_ctypes/basics.py
--- a/lib_pypy/_ctypes/basics.py
+++ b/lib_pypy/_ctypes/basics.py
@@ -175,7 +175,7 @@
 
 def cdata_from_address(self, address):
     # fix the address: turn it into as unsigned, in case it's a negative number
-    address = address & (sys.maxint * 2 + 1)
+    address = address & (sys.maxsize * 2 + 1)
     instance = self.__new__(self)
     lgt = getattr(self, '_length_', 1)
     instance._buffer = self._ffiarray.fromaddress(address, lgt)


More information about the pypy-commit mailing list