[pypy-svn] r78254 - pypy/branch/fast-forward/pypy/objspace/std

afa at codespeak.net afa at codespeak.net
Mon Oct 25 14:08:12 CEST 2010


Author: afa
Date: Mon Oct 25 14:08:11 2010
New Revision: 78254

Modified:
   pypy/branch/fast-forward/pypy/objspace/std/longtype.py
Log:
Fix translation


Modified: pypy/branch/fast-forward/pypy/objspace/std/longtype.py
==============================================================================
--- pypy/branch/fast-forward/pypy/objspace/std/longtype.py	(original)
+++ pypy/branch/fast-forward/pypy/objspace/std/longtype.py	Mon Oct 25 14:08:11 2010
@@ -92,8 +92,9 @@
     return space.newlong(0)
 
 def bit_length(space, w_obj):
+    bigint = space.bigint_w(w_obj)
     try:
-        return space.wrap(w_obj.num.bit_length())
+        return space.wrap(bigint.bit_length())
     except OverflowError:
         raise OperationError(space.w_OverflowError,
                              space.wrap("too many digits in integer"))



More information about the Pypy-commit mailing list