Author: stian
Branch: improve-rbigint
Changeset: r56333:4fee44dbf222
Date: 2012-06-25 08:38 +0200
http://bitbucket.org/pypy/pypy/changeset/4fee44dbf222/

Log:    We need the cast, otherwise I'm sure it won't work on 32bit. On
        64bit it links to the same type anyway

diff --git a/pypy/rlib/rbigint.py b/pypy/rlib/rbigint.py
--- a/pypy/rlib/rbigint.py
+++ b/pypy/rlib/rbigint.py
@@ -68,8 +68,7 @@
     elif SHIFT <= 31:
         return rffi.cast(rffi.INT, x)
     elif SHIFT <= 63:
-        return int(x)
-        #return rffi.cast(rffi.LONGLONG, x)
+        return rffi.cast(rffi.LONGLONG, x)
     else:
         raise ValueError("SHIFT too large!")
 
@@ -78,8 +77,8 @@
     #return rffi.cast(lltype.Signed, x)
 
 def _load_unsigned_digit(x):
-    #return r_ulonglong(x)
-    return rffi.cast(lltype.Unsigned, x)
+    return r_ulonglong(x)
+    #return rffi.cast(lltype.Unsigned, x)
 
 NULLDIGIT = _store_digit(0)
 ONEDIGIT  = _store_digit(1)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to