[pypy-svn] r29778 - in pypy/dist/pypy: rpython/lltypesystem rpython/lltypesystem/module translator/c

ericvrp at codespeak.net ericvrp at codespeak.net
Fri Jul 7 22:59:05 CEST 2006


Author: ericvrp
Date: Fri Jul  7 22:59:01 2006
New Revision: 29778

Modified:
   pypy/dist/pypy/rpython/lltypesystem/ll_str.py
   pypy/dist/pypy/rpython/lltypesystem/module/ll_strtod.py
   pypy/dist/pypy/translator/c/extfunc.py
Log:
(antocuni, arre, pedronis, pb)

fix the translation.



Modified: pypy/dist/pypy/rpython/lltypesystem/ll_str.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/ll_str.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/ll_str.py	Fri Jul  7 22:59:01 2006
@@ -107,7 +107,7 @@
     return result
 
 def ll_float_str(repr, f):
-    from pypy.rpython.module.ll_strtod import ll_strtod_formatd
+    from pypy.rpython.lltypesystem.module.ll_strtod import Implementation
     from pypy.rpython.lltypesystem.rstr import percent_f
-    return ll_strtod_formatd(percent_f, f)
+    return Implementation.ll_strtod_formatd(percent_f, f)
 

Modified: pypy/dist/pypy/rpython/lltypesystem/module/ll_strtod.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/module/ll_strtod.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/module/ll_strtod.py	Fri Jul  7 22:59:01 2006
@@ -2,9 +2,8 @@
 from pypy.rpython.module.support import LLSupport
 from pypy.tool.staticmethods import ClassMethods
 
-class Implementation(object, LLSupport):
-    __metaclass__ = ClassMethods
-
-    def ll_strtod_formatd(cls, fmt, x):
-        return cls.to_rstr(rarithmetic.formatd(cls.from_rstr(fmt), x))
+class Implementation:
+    def ll_strtod_formatd(fmt, x):
+        return LLSupport.to_rstr(rarithmetic.formatd(LLSupport.from_rstr(fmt), x))
     ll_strtod_formatd.suggested_primitive = True
+    ll_strtod_formatd = staticmethod(ll_strtod_formatd)
\ No newline at end of file

Modified: pypy/dist/pypy/translator/c/extfunc.py
==============================================================================
--- pypy/dist/pypy/translator/c/extfunc.py	(original)
+++ pypy/dist/pypy/translator/c/extfunc.py	Fri Jul  7 22:59:01 2006
@@ -52,7 +52,7 @@
     ll_math.ll_math_hypot: 'LL_math_hypot',
     ll_strtod.ll_strtod_parts_to_float:
         'LL_strtod_parts_to_float',
-    ll_strtod2.Implementation.ll_strtod_formatd.im_func:
+    ll_strtod2.Implementation.ll_strtod_formatd:
         'LL_strtod_formatd',
     ll_thread.ll_newlock:            'LL_thread_newlock',
     ll_thread.ll_acquirelock:        'LL_thread_acquirelock',



More information about the Pypy-commit mailing list