[pypy-commit] pypy win64-stage1: corrected ovfcheck for the final time! ; -)

ctismer noreply at buildbot.pypy.org
Fri Dec 2 02:39:23 CET 2011


Author: Christian Tismer <tismer at stackless.com>
Branch: win64-stage1
Changeset: r50050:f26e12e71561
Date: 2011-12-02 01:30 +0100
http://bitbucket.org/pypy/pypy/changeset/f26e12e71561/

Log:	corrected ovfcheck for the final time! ;-)

diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -147,7 +147,7 @@
     assert not isinstance(r, r_uint), "unexpected ovf check on unsigned"
     assert not isinstance(r, r_longlong), "ovfcheck not supported on r_longlong"
     assert not isinstance(r, r_ulonglong), "ovfcheck not supported on r_ulonglong"
-    if not is_valid_int(r):
+    if type(r) is long and not is_valid_int(r):
         # checks only if applicable to r's type.
         # this happens in the garbage collector.
         raise OverflowError, "signed integer expression did overflow"


More information about the pypy-commit mailing list