[pypy-commit] pypy utf8-unicode2: Remove some stray unicode literals

waedt noreply at buildbot.pypy.org
Sat Jul 19 14:42:04 CEST 2014


Author: Tyler Wade <wayedt at gmail.com>
Branch: utf8-unicode2
Changeset: r72472:821f21a34f0a
Date: 2014-07-19 07:41 -0500
http://bitbucket.org/pypy/pypy/changeset/821f21a34f0a/

Log:	Remove some stray unicode literals

diff --git a/pypy/interpreter/baseobjspace.py b/pypy/interpreter/baseobjspace.py
--- a/pypy/interpreter/baseobjspace.py
+++ b/pypy/interpreter/baseobjspace.py
@@ -1551,7 +1551,7 @@
         "Like unicode_w, but rejects strings with NUL bytes."
         from rpython.rlib import rstring
         result = w_obj.unicode_w(self)
-        if u'\x00' in result:
+        if Utf8Str('\x00') in result:
             raise OperationError(self.w_TypeError, self.wrap(
                     'argument must be a unicode string without NUL characters'))
         return rstring.assert_str0(result)
diff --git a/pypy/interpreter/utf8_codecs.py b/pypy/interpreter/utf8_codecs.py
--- a/pypy/interpreter/utf8_codecs.py
+++ b/pypy/interpreter/utf8_codecs.py
@@ -727,7 +727,7 @@
     else:
         bo = 1
     if size == 0:
-        return u'', 0, bo
+        return Utf8Str(''), 0, bo
     if bo == -1:
         # force little endian
         ihi = 1
@@ -911,7 +911,7 @@
     else:
         bo = 1
     if size == 0:
-        return u'', 0, bo
+        return Utf8Str(''), 0, bo
     if bo == -1:
         # force little endian
         iorder = [0, 1, 2, 3]
@@ -1285,7 +1285,7 @@
     if errorhandler is None:
         errorhandler = default_unicode_error_decode
     if size == 0:
-        return u'', 0
+        return Utf8Str(''), 0
 
     pos = 0
     result = Utf8Builder(size)


More information about the pypy-commit mailing list