[pypy-commit] pypy win64 test: Small cleanup (eg test_all.py)
berdario
noreply at buildbot.pypy.org
Fri Jul 1 15:08:07 CEST 2011
Author: Dario Bertini <berdario at gmail.com>
Branch: win64 test
Changeset: r45225:313a60758e6a
Date: 2011-07-01 15:09 +0200
http://bitbucket.org/pypy/pypy/changeset/313a60758e6a/
Log: Small cleanup (eg test_all.py) Changed the int argtype in opimpl
diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -72,7 +72,6 @@
n &= LONG_MASK
if n >= LONG_TEST:
n -= 2*LONG_TEST
- # return int(n)
return n
def longlongmask(n):
@@ -113,7 +112,6 @@
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 type(r) is long:
if abs(r) > sys.maxint:
raise OverflowError, "signed integer expression did overflow"
return r
diff --git a/pypy/rpython/lltypesystem/opimpl.py b/pypy/rpython/lltypesystem/opimpl.py
--- a/pypy/rpython/lltypesystem/opimpl.py
+++ b/pypy/rpython/lltypesystem/opimpl.py
@@ -29,7 +29,7 @@
r_longlong_result = r_longlong
argtype_by_name = {
- 'int': long, # XXX int,
+ 'int': (int, long),
'float': float,
'uint': r_uint,
'llong': r_longlong_arg,
diff --git a/pypy/test_all.py b/pypy/test_all.py
--- a/pypy/test_all.py
+++ b/pypy/test_all.py
@@ -1,7 +1,3 @@
-import sys
-sys.orig_maxint = sys.maxint
-sys.maxint = 2**63-1
-
#! /usr/bin/env python
"""
PyPy Test runner interface
@@ -14,6 +10,9 @@
For more information, use test_all.py -h.
"""
import sys, os
+sys.orig_maxint = sys.maxint
+sys.maxint = 2**63-1
+
if len(sys.argv) == 1 and os.path.dirname(sys.argv[0]) in '.':
print >> sys.stderr, __doc__
More information about the pypy-commit
mailing list