[pypy-commit] pypy PyBuffer: Kill unused W_Root methods .readbuf_w() and .writebuf_w()
rlamy
pypy.commits at gmail.com
Thu Apr 20 12:36:57 EDT 2017
Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: PyBuffer
Changeset: r91101:ca4e5b0e8cdb
Date: 2017-04-20 16:11 +0100
http://bitbucket.org/pypy/pypy/changeset/ca4e5b0e8cdb/
Log: Kill unused W_Root methods .readbuf_w() and .writebuf_w()
diff --git a/pypy/module/mmap/interp_mmap.py b/pypy/module/mmap/interp_mmap.py
--- a/pypy/module/mmap/interp_mmap.py
+++ b/pypy/module/mmap/interp_mmap.py
@@ -26,10 +26,6 @@
raise oefmt(space.w_BufferError, "Object is not writable.")
return SimpleBuffer(MMapBuffer(self.space, self.mmap, readonly))
- def writebuf_w(self, space):
- self.check_writeable()
- return MMapBuffer(self.space, self.mmap, False)
-
def close(self):
self.mmap.close()
diff --git a/pypy/objspace/std/bytesobject.py b/pypy/objspace/std/bytesobject.py
--- a/pypy/objspace/std/bytesobject.py
+++ b/pypy/objspace/std/bytesobject.py
@@ -421,13 +421,6 @@
space.check_buf_flags(flags, True)
return SimpleBuffer(StringBuffer(self._value))
- def readbuf_w(self, space):
- return StringBuffer(self._value)
-
- def writebuf_w(self, space):
- raise oefmt(space.w_TypeError,
- "Cannot use bytes as modifiable buffer")
-
def descr_getbuffer(self, space, w_flags):
#from pypy.objspace.std.bufferobject import W_Buffer
#return W_Buffer(StringBuffer(self._value))
More information about the pypy-commit
mailing list