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

arigo at codespeak.net arigo at codespeak.net
Thu May 4 12:38:07 CEST 2006


Author: arigo
Date: Thu May  4 12:38:03 2006
New Revision: 26757

Modified:
   pypy/dist/pypy/objspace/std/longobject.py
Log:
We now need to specialize this, for space.wrap(r_xxx())
where r_xxx can be various classes from rarithmetic.


Modified: pypy/dist/pypy/objspace/std/longobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/longobject.py	(original)
+++ pypy/dist/pypy/objspace/std/longobject.py	Thu May  4 12:38:03 2006
@@ -618,7 +618,7 @@
 #_________________________________________________________________
 
 # Helper Functions
-def args_from_long(l): #YYYYYY
+def args_from_long(l):
     if l < 0:
         sign = -1
     elif l > 0:
@@ -634,7 +634,9 @@
     if sign == 0:
         digits = [0]
     return digits, sign
-
+args_from_long._annspecialcase_ = "specialize:argtype(0)"
+# ^^^ specialized by the precise type of 'l', which is typically a r_xxx
+#     instance from rpython.rarithmetic
 
 def _x_add(a, b):
     """ Add the absolute values of two long integers. """



More information about the Pypy-commit mailing list