[pypy-svn] r27387 - in pypy/dist/pypy/rpython: lltypesystem test

antocuni at codespeak.net antocuni at codespeak.net
Thu May 18 10:32:32 CEST 2006


Author: antocuni
Date: Thu May 18 10:32:26 2006
New Revision: 27387

Modified:
   pypy/dist/pypy/rpython/lltypesystem/rstr.py
   pypy/dist/pypy/rpython/test/test_rstr.py
Log:
Fixed some bad references to ll_int2hex & co.



Modified: pypy/dist/pypy/rpython/lltypesystem/rstr.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rstr.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/rstr.py	Thu May 18 10:32:26 2006
@@ -7,7 +7,7 @@
 from pypy.rpython.rstr import AbstractStringRepr,AbstractCharRepr,\
      AbstractUniCharRepr, AbstractStringIteratorRepr,\
      AbstractLLHelpers
-from pypy.rpython import rint
+from pypy.rpython.lltypesystem import ll_str
 from pypy.rpython.lltypesystem.lltype import \
      GcStruct, Signed, Array, Char, UniChar, Ptr, malloc, \
      Bool, Void, GcArray, nullptr, pyobjectptr
@@ -624,17 +624,18 @@
                     vchunk = hop.gendirectcall(r_arg.ll_str, vitem)
                 elif code == 'd':
                     assert isinstance(r_arg, IntegerRepr)
-                    vchunk = hop.gendirectcall(r_arg.ll_str, vitem)
+                    #vchunk = hop.gendirectcall(r_arg.ll_str, vitem)
+                    vchunk = hop.gendirectcall(ll_str.ll_int2dec, vitem)
                 elif code == 'f':
                     #assert isinstance(r_arg, FloatRepr)
                     vchunk = hop.gendirectcall(r_arg.ll_str, vitem)
                 elif code == 'x':
                     assert isinstance(r_arg, IntegerRepr)
-                    vchunk = hop.gendirectcall(rint.ll_int2hex, vitem,
+                    vchunk = hop.gendirectcall(ll_str.ll_int2hex, vitem,
                                                inputconst(Bool, False))
                 elif code == 'o':
                     assert isinstance(r_arg, IntegerRepr)
-                    vchunk = hop.gendirectcall(rint.ll_int2oct, vitem,
+                    vchunk = hop.gendirectcall(ll_str.ll_int2oct, vitem,
                                                inputconst(Bool, False))
                 else:
                     raise TyperError, "%%%s is not RPython" % (code, )
@@ -701,5 +702,3 @@
 list_str_open_bracket = string_repr.convert_const("[")
 list_str_close_bracket = string_repr.convert_const("]")
 list_str_sep = string_repr.convert_const(", ")
-
-import ll_str # side-effects due to __extend__

Modified: pypy/dist/pypy/rpython/test/test_rstr.py
==============================================================================
--- pypy/dist/pypy/rpython/test/test_rstr.py	(original)
+++ pypy/dist/pypy/rpython/test/test_rstr.py	Thu May 18 10:32:26 2006
@@ -356,6 +356,8 @@
 
 
     def test_strformat(self):
+        self._skip_oo('string formatting')
+        
         def percentS(s):
             return "before %s after" % (s,)
 



More information about the Pypy-commit mailing list