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

antocuni at codespeak.net antocuni at codespeak.net
Tue Jan 27 09:55:00 CET 2009


Author: antocuni
Date: Tue Jan 27 09:55:00 2009
New Revision: 61382

Modified:
   pypy/trunk/pypy/objspace/std/unicodeobject.py
Log:
fix translation



Modified: pypy/trunk/pypy/objspace/std/unicodeobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/unicodeobject.py	(original)
+++ pypy/trunk/pypy/objspace/std/unicodeobject.py	Tue Jan 27 09:55:00 2009
@@ -768,8 +768,9 @@
 
 def unicode_replace__Unicode_ANY_ANY_ANY(space, w_self, w_old, w_new,
                                          w_maxsplit):
-    return _unicode_replace(space, w_self, space.buffer_w(w_old).as_str(),
-                            space.buffer_w(w_new).as_str(), w_maxsplit)
+    old = unicode(space.buffer_w(w_old).as_str())
+    new = unicode(space.buffer_w(w_new).as_str())
+    return _unicode_replace(space, w_self, old, new, w_maxsplit)
 
 def _unicode_replace(space, w_self, old, new, w_maxsplit):
     if len(old):



More information about the Pypy-commit mailing list