[pypy-commit] pypy refactor-buffer-api: fix usage of bufferstr_w in unicodeobject

bdkearns noreply at buildbot.pypy.org
Thu Apr 24 05:36:25 CEST 2014


Author: Brian Kearns <bdkearns at gmail.com>
Branch: refactor-buffer-api
Changeset: r70916:da264ab81348
Date: 2014-04-23 22:54 -0400
http://bitbucket.org/pypy/pypy/changeset/da264ab81348/

Log:	fix usage of bufferstr_w in unicodeobject

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
@@ -448,12 +448,12 @@
     if errors is None or errors == 'strict':
         if encoding == 'ascii':
             # XXX error handling
-            s = space.bufferstr_w(w_obj)
+            s = space.charbuf_w(w_obj)
             eh = unicodehelper.decode_error_handler(space)
             return space.wrap(str_decode_ascii(
                     s, len(s), None, final=True, errorhandler=eh)[0])
         if encoding == 'utf-8':
-            s = space.bufferstr_w(w_obj)
+            s = space.charbuf_w(w_obj)
             eh = unicodehelper.decode_error_handler(space)
             return space.wrap(str_decode_utf_8(
                     s, len(s), None, final=True, errorhandler=eh,


More information about the pypy-commit mailing list