[pypy-svn] pypy bytearray: (mfoord) making unicode type clearer for the annotator
mfoord
commits-noreply at bitbucket.org
Sat Jan 22 13:16:03 CET 2011
Author: Michael Foord <michael at voidspace.org.uk>
Branch: bytearray
Changeset: r41218:9b22d7ca7a5d
Date: 2011-01-22 13:16 +0100
http://bitbucket.org/pypy/pypy/changeset/9b22d7ca7a5d/
Log: (mfoord) making unicode type clearer for the annotator
diff --git a/pypy/objspace/std/unicodeobject.py b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -778,11 +778,11 @@
if not space.isinstance_w(w_old, space.w_unicode):
old = unicode(space.bufferstr_w(w_old))
else:
- old = w_old._value
+ old = space.unicode_w(w_old)
if not space.isinstance_w(w_new, space.w_unicode):
new = unicode(space.bufferstr_w(w_new))
else:
- new = w_new._value
+ new = space.unicode_w(w_new)
return _unicode_replace(space, w_self, old, new, w_maxsplit)
def _unicode_replace(space, w_self, old, new, w_maxsplit):
More information about the Pypy-commit
mailing list