diff options
author | Christian Heimes <christian@cheimes.de> | 2007-12-04 23:02:19 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-12-04 23:02:19 (GMT) |
commit | a37d4c693a024154093b36a612810c3bd72d9254 (patch) | |
tree | d8c061b9356d7bf8f444bcfd7869c1ac5bec9f3c /Lib/ctypes | |
parent | 327858ef2c4512937a1333212a3b46a62c18ccc3 (diff) | |
download | cpython-a37d4c693a024154093b36a612810c3bd72d9254.zip cpython-a37d4c693a024154093b36a612810c3bd72d9254.tar.gz cpython-a37d4c693a024154093b36a612810c3bd72d9254.tar.bz2 |
Removed PyInt_GetMax and sys.maxint
I replaced sys.maxint with sys.maxsize in Lib/*.py. Does anybody see a problem with the change on Win 64bit platforms? Win 64's long is just 32bit but the sys.maxsize is now 2**63-1 on every 64bit platform.
Also added docs for sys.maxsize.
Diffstat (limited to 'Lib/ctypes')
-rw-r--r-- | Lib/ctypes/__init__.py | 4 | ||||
-rw-r--r-- | Lib/ctypes/util.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/ctypes/__init__.py b/Lib/ctypes/__init__.py index e1c9d84..f7d0970 100644 --- a/Lib/ctypes/__init__.py +++ b/Lib/ctypes/__init__.py @@ -348,8 +348,8 @@ class CDLL(object): def __repr__(self): return "<%s '%s', handle %x at %x>" % \ (self.__class__.__name__, self._name, - (self._handle & (_sys.maxint*2 + 1)), - id(self) & (_sys.maxint*2 + 1)) + (self._handle & (_sys.maxsize*2 + 1)), + id(self) & (_sys.maxsize*2 + 1)) def __getattr__(self, name): if name.startswith('__') and name.endswith('__'): diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py index f02b547..629e383 100644 --- a/Lib/ctypes/util.py +++ b/Lib/ctypes/util.py @@ -98,7 +98,7 @@ elif os.name == "posix": nums.insert(0, int(parts.pop())) except ValueError: pass - return nums or [ sys.maxint ] + return nums or [ sys.maxsize ] def find_library(name): ename = re.escape(name) |