[pypy-svn] pypy default: No-op clean-up.

arigo commits-noreply at bitbucket.org
Fri Jan 21 16:49:44 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r41152:b89fa4fc1b09
Date: 2011-01-21 16:49 +0100
http://bitbucket.org/pypy/pypy/changeset/b89fa4fc1b09/

Log:	No-op clean-up.

diff --git a/pypy/objspace/std/longtype.py b/pypy/objspace/std/longtype.py
--- a/pypy/objspace/std/longtype.py
+++ b/pypy/objspace/std/longtype.py
@@ -49,17 +49,7 @@
                     w_obj = space.long(w_obj)
                 else:
                     w_obj = space.int(w_obj)
-            if space.is_true(space.isinstance(w_obj, space.w_long)):
-                assert isinstance(w_obj, W_LongObject)  # XXX this could fail!
-                # XXX find a way to do that even if w_obj is not a W_LongObject
-                bigint = w_obj.num
-            elif space.is_true(space.isinstance(w_obj, space.w_int)):
-                from pypy.rlib.rbigint import rbigint
-                intval = space.int_w(w_obj)
-                bigint = rbigint.fromint(intval)
-            else:
-                raise OperationError(space.w_ValueError,
-                                    space.wrap("value can't be converted to long"))
+            bigint = space.bigint_w(w_obj)
     else:
         base = space.int_w(w_base)
 


More information about the Pypy-commit mailing list