[pypy-svn] r59484 - pypy/trunk/pypy/objspace/std

fijal at codespeak.net fijal at codespeak.net
Tue Oct 28 15:39:29 CET 2008


Author: fijal
Date: Tue Oct 28 15:39:28 2008
New Revision: 59484

Modified:
   pypy/trunk/pypy/objspace/std/stringobject.py
Log:
Use official buffer API


Modified: pypy/trunk/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/stringobject.py	(original)
+++ pypy/trunk/pypy/objspace/std/stringobject.py	Tue Oct 28 15:39:28 2008
@@ -515,8 +515,9 @@
     
 
 def str_replace__String_ANY_ANY_ANY(space, w_self, w_sub, w_by, w_maxsplit):
-    return _string_replace(space, w_self._value, space.buffer_w(w_sub).value,
-                           space.buffer_w(w_by).value, space.int_w(w_maxsplit))
+    return _string_replace(space, w_self._value, space.buffer_w(w_sub).as_str(),
+                           space.buffer_w(w_by).as_str(),
+                           space.int_w(w_maxsplit))
 
 def str_replace__String_String_String_ANY(space, w_self, w_sub, w_by, w_maxsplit=-1):
     input = w_self._value



More information about the Pypy-commit mailing list