[pypy-svn] r40017 - pypy/dist/pypy/interpreter
gbrandl at codespeak.net
gbrandl at codespeak.net
Wed Mar 7 12:08:10 CET 2007
Author: gbrandl
Date: Wed Mar 7 12:08:09 2007
New Revision: 40017
Modified:
pypy/dist/pypy/interpreter/baseobjspace.py
Log:
(arigo, xoraxax, gbrandl): fix wrong assumption in getindex_w.
Modified: pypy/dist/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/dist/pypy/interpreter/baseobjspace.py (original)
+++ pypy/dist/pypy/interpreter/baseobjspace.py Wed Mar 7 12:08:09 2007
@@ -797,8 +797,8 @@
if not err.match(self, self.w_OverflowError):
raise
if not w_exception:
- # w_index is a long object
- if w_index.get_sign() < 0:
+ # w_index should be a long object, but can't be sure of that
+ if self.is_true(self.lt(w_index, self.wrap(0))):
return -sys.maxint-1
else:
return sys.maxint
More information about the Pypy-commit
mailing list