Author: Ronan Lamy <[email protected]>
Branch: PyBuffer
Changeset: r91049:61490339e1fe
Date: 2017-04-13 01:09 +0100
http://bitbucket.org/pypy/pypy/changeset/61490339e1fe/

Log:    fix W_StringBufferObject.buffer_w()

diff --git a/pypy/objspace/std/strbufobject.py 
b/pypy/objspace/std/strbufobject.py
--- a/pypy/objspace/std/strbufobject.py
+++ b/pypy/objspace/std/strbufobject.py
@@ -2,9 +2,9 @@
 
 import py
 
-from pypy.objspace.std.bytesobject import (W_AbstractBytesObject,
-    W_BytesObject, StringBuffer)
+from pypy.objspace.std.bytesobject import W_AbstractBytesObject, W_BytesObject
 from pypy.interpreter.gateway import interp2app, unwrap_spec
+from pypy.interpreter.buffer import SimpleBuffer, StringBuffer
 from pypy.interpreter.error import OperationError
 from rpython.rlib.rstring import StringBuilder
 
@@ -38,7 +38,7 @@
         return self.force()
 
     def buffer_w(self, space, flags):
-        return StringBuffer(self.force())
+        return SimpleBuffer(StringBuffer(self.force()))
 
     def descr_len(self, space):
         return space.newint(self.length)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to