Author: stian
Branch: improve-rbigint
Changeset: r56322:4e53823b9304
Date: 2012-06-23 18:04 +0200
http://bitbucket.org/pypy/pypy/changeset/4e53823b9304/
Log: On 64bit x can already fit 2*shift ints
diff --git a/pypy/rlib/rbigint.py b/pypy/rlib/rbigint.py
--- a/pypy/rlib/rbigint.py
+++ b/pypy/rlib/rbigint.py
@@ -54,9 +54,9 @@
def _widen_digit(x):
if not we_are_translated():
assert is_valid_int(x), "widen_digit() takes an int, got a %r" %
type(x)
- if SHIFT <= 15:
- return int(x)
- return r_longlong(x)
+ if LONG_BIT < 64:
+ return r_longlong(x)
+ return x
def _store_digit(x):
if not we_are_translated():
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit