[pypy-svn] r14358 - pypy/dist/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Wed Jul 6 20:43:54 CEST 2005


Author: arigo
Date: Wed Jul  6 20:43:53 2005
New Revision: 14358

Modified:
   pypy/dist/pypy/objspace/std/strutil.py
Log:
Grumble.  More annotator-friendly hacks.  Needs to be refactored according to
idea hinted to in the previous check-in.


Modified: pypy/dist/pypy/objspace/std/strutil.py
==============================================================================
--- pypy/dist/pypy/objspace/std/strutil.py	(original)
+++ pypy/dist/pypy/objspace/std/strutil.py	Wed Jul  6 20:43:53 2005
@@ -129,9 +129,11 @@
         digit = p.next_digit()
         if digit == -1:
             if p.sign == -1:
-                return space.neg(w_result)
-            else:
-                return w_result
+                w_result = space.neg(w_result)
+            # XXX grumble
+            from pypy.objspace.std.longobject import W_LongObject
+            assert isinstance(w_result, W_LongObject)
+            return w_result
         w_result = space.add(space.mul(w_result,w_base),space.newlong(r_uint(digit)))
 
 def break_up_float(s):



More information about the Pypy-commit mailing list